description
stringlengths
116
4.23k
code
stringlengths
9
53.6k
sample_inputs
stringlengths
0
914
sample_outputs
stringlengths
0
1.33k
normalized_code
stringlengths
25
86.1k
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(' that '.join(['I hate' if not i % 2 else 'I love' for i in range(int(input()))]), end = ' it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL STRING BIN_OP VAR NUMBER STRING STRING VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
n = int(input()); a = ['that I love ', 'that I hate ']; print('I hate ' + ''.join(a[i % 2] for i in range(n - 1)) + 'it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING EXPR FUNC_CALL VAR BIN_OP BIN_OP STRING FUNC_CALL STRING VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(' that '.join([i % 2 == 0 and 'I hate' or 'I love' for i in range(0, int(input()))]), 'it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL STRING BIN_OP VAR NUMBER NUMBER STRING STRING VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(" ".join(("I hate that", "I love that")[i % 2] for i in range(int(input())))[:-4] + "it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP FUNC_CALL STRING STRING STRING BIN_OP VAR NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(*(["I hate", "I love"]* 50)[: int(input())], sep=" that ", end=" it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP LIST STRING STRING NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(" that ".join(map(lambda x: 'I love' if x % 2 else 'I hate', range(0, int(input())))), end=" it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL STRING FUNC_CALL VAR BIN_OP VAR NUMBER STRING STRING FUNC_CALL VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(f"{' that '.join(['I hate' if str(i)[-1] in '02468' else 'I love' for i in range(int(input()))])} it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL STRING FUNC_CALL VAR VAR NUMBER STRING STRING STRING VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(*[['I hate', 'I love'][i % 2] for i in range(int(input()))], sep=' that ', end=' it\n')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR LIST STRING STRING BIN_OP VAR NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(f'I hate {"".join(["that I " + ("hate " if x % 2 == 0 else "love ") for x in range(1, int(input()))])}it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR STRING FUNC_CALL STRING BIN_OP STRING BIN_OP VAR NUMBER NUMBER STRING STRING VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(''.join(['I hate '] + [['that I hate ', 'that I love '][(i + 1) % 2] for i in range(int(input()) - 1)] + ['it']))
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL STRING BIN_OP BIN_OP LIST STRING LIST STRING STRING BIN_OP BIN_OP VAR NUMBER NUMBER VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR FUNC_CALL VAR NUMBER LIST STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(" that ".join(["I hate" if i%2==0 else "I love" for i in range(int(input()))]) + " it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP FUNC_CALL STRING BIN_OP VAR NUMBER NUMBER STRING STRING VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print('I hate',*([' that I love',' that I hate'][i%2]for i in range(int(input())-1)),'it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR STRING LIST STRING STRING BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR FUNC_CALL VAR NUMBER STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print('I hate',*('that I '+['love','hate'][i%2]for i in range(int(input())-1)),'it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR STRING BIN_OP STRING LIST STRING STRING BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR FUNC_CALL VAR NUMBER STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print((lambda x:'I hate that I love that '*((x-1)//2)+('I hate that I love it','I hate it')[x&1])(int(input())))
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR FUNC_CALL BIN_OP BIN_OP STRING BIN_OP BIN_OP VAR NUMBER NUMBER STRING STRING BIN_OP VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(' that '.join(['II hlaotvee'[i%2::2]for i in range(int(input()))])+' it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP FUNC_CALL STRING STRING BIN_OP VAR NUMBER NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(*(['I hate', 'I love'] * 100)[:int(input())], sep=' that ', end=' it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP LIST STRING STRING NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
n = int(input()); a = ["I hate","I love"]*n; print(" that ".join(a[:n]),"it")
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST STRING STRING VAR EXPR FUNC_CALL VAR FUNC_CALL STRING VAR VAR STRING
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings. Hulk likes the Inception so much, and like that his feelings are complicated. They have n layers. The first layer is hate, second one is love, third one is hate and so on... For example if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on. Please help Dr. Banner. Input The only line of the input contains a single integer n (1 ≀ n ≀ 100) β€” the number of layers of love and hate. Output Print Dr.Banner's feeling in one line. Examples Input 1 Output I hate it Input 2 Output I hate that I love it Input 3 Output I hate that I love that I hate it
print(' that '.join(['I love' if i % 2 == 1 else 'I hate' for i in range(int(input()))]) + ' it')
2 1 3
I hate that I love it I hate it I hate that I love that I hate it
EXPR FUNC_CALL VAR BIN_OP FUNC_CALL STRING BIN_OP VAR NUMBER NUMBER STRING STRING VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR STRING
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
*s,c=input().split();print(c,*s)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
a,b,c=map(int,input().split());print(c,a,b)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
x,y,z=input().split();print(z,x,y)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
X,Y,Z=map(int,input().split());print(Z,X,Y)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
x,y,z = map(int,input().split());print(z,x,y)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
print(*(lambda a, b, c: (c, a, b))(*input().split()))
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
EXPR FUNC_CALL VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
X,Y,Z=input().split();print(Z,X,Y)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
a,b,c=input().split();print(c,a,b)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C Constraints * 1 \leq X,Y,Z \leq 100 * All values in input are integers. Input Input is given from Standard Input in the following format: X Y Z Output Print the integers contained in the boxes A, B, and C, in this order, with space in between. Examples Input 1 2 3 Output 3 1 2 Input 100 100 100 Output 100 100 100 Input 41 59 31 Output 31 41 59
x,y,z = list(map(int,input().split())); print(z,x,y)
100 100 10041 59 311 2 3
100 100 10031 41 593 1 2
ASSIGN VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
l,r=map(int,input().split());s=range(l,min(r+1,l+2019));print(min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
l,r=map(int,input().split());s=range(l,r+1)[:2019];print(min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
s=range(*eval(input().replace(' ',',1+')))[:673];print(min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR STRING STRING NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
l,r=map(int,input().split());s=range(l,r+1)[:673];print(min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
l,r=map(int,input().split());s=range(l,r+1);print(+(r-l<2e3)and min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR VAR NUMBER FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019. Constraints * All values in input are integers. * 0 \leq L < R \leq 2 \times 10^9 Input Input is given from Standard Input in the following format: L R Output Print the minimum possible value of (i \times j) \mbox{ mod } 2019 when i and j are chosen under the given condition. Examples Input 2020 2040 Output 2 Input 4 5 Output 20
l,r=map(int,input().split());s=range(l,r+1);print(+(r-l<2019)and min(i*j%2019for i in s for j in s if i<j))
4 52020 2040
202
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR VAR NUMBER FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER VAR VAR VAR VAR VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(b+[a,-a][b%a>0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR LIST VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(b-a if b%a else b+a)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
A,B=map(int,input().split());print([B-A,A+B][B%A==0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
A,B=map(int,input().split());print(B-A if B%A else A+B)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(a+b-2*a*(b%a>0))
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR BIN_OP BIN_OP NUMBER VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a, b = map(int, input().split());print(b - a if b % a else a + b)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=[int(i) for i in input().split()];print([a+b,b-a][b%a!=0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(b+a*(2*(not b%a)-1))
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR BIN_OP BIN_OP NUMBER BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(b-a*(2*(b%a>0)-1))
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR BIN_OP BIN_OP NUMBER BIN_OP VAR VAR NUMBER NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(a+b if b%a==0 else b-a)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR NUMBER BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
A,B=map(int,input().split());print(A+B if B%A==0 else B-A)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR NUMBER BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
print((lambda a,b: b-a if b%a else a+b)(*[int(i) for i in input().split()]))
4 128 201 1
16122
EXPR FUNC_CALL VAR FUNC_CALL BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print([b+a,b-a][b%a>0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
[print(b-(-1)**(b%a==0)*a)for a,b in [[int(i) for i in input().split()]]]
4 128 201 1
16122
EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP BIN_OP NUMBER BIN_OP VAR VAR NUMBER VAR VAR VAR LIST FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print([a+b,b-a][b%a>0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print((b-a)*(b%a>0)or a+b)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR NUMBER BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
A,B = map(int,input().split()) [print(A+B) if B%A == 0 else print(B-A)]
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR BIN_OP VAR VAR NUMBER FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print(b + a*(b%a==0) - a*(b%a>0))
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR BIN_OP VAR BIN_OP VAR VAR NUMBER BIN_OP VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print([b-a,a+b][b%a==0])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
A,B=map(int,input().split());print(B-A if B%A!=0else A+B)
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR NUMBER BIN_OP VAR VAR BIN_OP VAR VAR
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A. Constraints * All values in input are integers. * 1 \leq A \leq B \leq 20 Input Input is given from Standard Input in the following format: A B Output If A is a divisor of B, print A + B; otherwise, print B - A. Examples Input 4 12 Output 16 Input 8 20 Output 12 Input 1 1 Output 2
a,b=map(int,input().split());print([b-a,a+b][b%a<1])
4 128 201 1
16122
ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR LIST BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
_,*l=open(0);from itertools import*;print(sum(x*y*z for x,y,z in combinations([sum(c==s[0]for s in l)for c in'MARCH'],3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR NUMBER VAR VAR VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;print(sum(p*q*r for p,q,r in combinations(map(list(zip(*open(0).readlines()))[0].count,'MARCH'),3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER NUMBER STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;s,*_=zip(*open(0));print(sum(p*q*r for p,q,r in combinations(map(s.count,'MARCH'),3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;x=[s[0]for s in open(0).readlines()];print(sum(p*q*r for p,q,r in combinations([x.count(s)for s in"MARCH"],3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR NUMBER VAR FUNC_CALL FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;c=list(zip(*open(0).readlines()))[0].count;print(sum(c(p)*c(q)*c(r)for p,q,r in combinations('MARCH',3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP FUNC_CALL VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR VAR VAR VAR FUNC_CALL VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
import itertools as i,collections as c;print(sum(p*q*r for p,q,r in i.combinations(c.Counter(s[0]for s in open(0).readlines()[1:]if s[0]in"MARCH").values(),3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
IMPORT EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR VAR NUMBER VAR FUNC_CALL FUNC_CALL VAR NUMBER NUMBER VAR NUMBER STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;s,*_=zip(*open(0).readlines());print(sum(p*q*r for p,q,r in combinations(map(s.count,'MARCH'),3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;N,*S=open(0);print(sum(a*b*c for a,b,c in combinations([sum(1for s in S if s[0]==c)for c in"MARCH"],3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER VAR VAR VAR NUMBER VAR VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;s,*_=zip(*open(0).readlines());c=s.count;print(sum(c(p)*c(q)*c(r)for p,q,r in combinations('MARCH',3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER ASSIGN VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP FUNC_CALL VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR VAR VAR VAR FUNC_CALL VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;print(sum(p*q*r for p,q,r in list(combinations([len(list(v))for k,v in groupby(sorted(s[0]for s in open(0).readlines()[1:]))if k in"MARCH"],3))))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER VAR FUNC_CALL FUNC_CALL VAR NUMBER NUMBER VAR STRING NUMBER
There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to choose three people, disregarding order? Note that the answer may not fit into a 32-bit integer type. Constraints * 1 \leq N \leq 10^5 * S_i consists of uppercase English letters. * 1 \leq |S_i| \leq 10 * S_i \neq S_j (i \neq j) Input Input is given from Standard Input in the following format: N S_1 : S_N Output If there are x ways to choose three people so that the given conditions are met, print x. Examples Input 5 MASHIKE RUMOI OBIRA HABORO HOROKANAI Output 2 Input 4 ZZ ZZZ Z ZZZZZZZZZZ Output 0 Input 5 CHOKUDAI RNG MAKOTO AOKI RINGO Output 7
from itertools import*;s,*_=zip(*open(0).readlines());print(sum(p*q*r for p,q,r in combinations([s.count(t)for t in"MARCH"],3)))
5 MASHIKE RUMOI OBIRA HABORO HOROKANAI5 CHOKUDAI RNG MAKOTO AOKI RINGO4 ZZ ZZZ Z ZZZZZZZZZZ
270
ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR STRING NUMBER
Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, but his coordinate afterwards cannot be known to Aoki. Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneously: * Let the current coordinate of Aoki be a, then Aoki moves to a coordinate he selects from a-1, a and a+1. * Let the current coordinate of Takahashi be b, then Takahashi moves to the coordinate b-1 with probability of p percent, and moves to the coordinate b+1 with probability of 100-p percent. When the coordinates of Aoki and Takahashi coincide, Aoki can find Takahashi. When they pass by each other, Aoki cannot find Takahashi. Aoki wants to minimize the expected number of turns taken until he finds Takahashi. Find the minimum possible expected number of turns. Constraints * 1 ≦ x ≦ 1,000,000,000 * 1 ≦ p ≦ 100 * x and p are integers. Input The input is given from Standard Input in the following format: x p Output Print the minimum possible expected number of turns. The output is considered correct if the absolute or relative error is at most 10^{-6}. Examples Input 3 100 Output 2.0000000 Input 6 40 Output 7.5000000 Input 101 80 Output 63.7500000
print((int(input())+1)//2/int(input())*100)
6 40101 803 100
7.500000063.75000002.0000000
EXPR FUNC_CALL VAR BIN_OP BIN_OP BIN_OP BIN_OP FUNC_CALL VAR FUNC_CALL VAR NUMBER NUMBER FUNC_CALL VAR FUNC_CALL VAR NUMBER
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≀ n ≀ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
import math;print([(x.append(y), x) for x in [[100000]] for _ in range(int(input())) for y in [math.ceil(x[-1] * 1.05 / 1000)*1000]][-1][-1][-1])
5
130000
IMPORT EXPR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR LIST LIST NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR LIST BIN_OP FUNC_CALL VAR BIN_OP BIN_OP VAR NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER