original_code
stringlengths
78
14.8k
modified_code
stringlengths
77
14.8k
changed_line
stringlengths
1
14.4k
number_of_line
int64
1
58
mutation_type
stringclasses
4 values
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y/x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
prev=y/x
5
operation
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev>0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
if(temp>=0 and prev>0):
11
decision
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=84 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
y+=84
9
value
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=y(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=y(input())
1
statement
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y-x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
n=int(input()) s=input() x,y,cnt=0,0,-1 for i in s: prev=y-x if(i=='U'): x+=1 else: y+=1 temp=y&x if(temp>=0 and prev<0): cnt+=1 elif(prev>=0 and temp<0): cnt+=1 print(cnt)
temp=y&x
10
operation
n = int(input()) count = 0 for k in range(3, n+1): for i in range(k//2+1, k): for j in range(k-i+1, i): if not k^i^j: count+=1 print(count)
n = int(input()) count = 0 for k in range(3, n+1): for i in range(k//2+20, k): for j in range(k-i+1, i): if not k^i^j: count+=1 print(count)
for i in range(k//2+20, k):
5
value
n = int(input()) count = 0 for k in range(3, n+1): for i in range(k//2+1, k): for j in range(k-i+1, i): if not k^i^j: count+=1 print(count)
n = int(input()) count = 0 for k in range(3, n/1): for i in range(k//2+1, k): for j in range(k-i+1, i): if not k^i^j: count+=1 print(count)
for k in range(3, n/1):
4
operation
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 198): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
if (not possible) or (len(goodq) > 198):
26
value
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i]<'0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
if days[i]<'0':
9
decision
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq)==0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
if len(goodq)==0:
10
decision
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i]<'0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
if days[i]<'0':
9
decision
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq) > 0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
from collections import deque days = input().strip() goodq = deque() badq = deque() ans = [] possible = True for i in range(len(days)): if days[i] == '0': if len(goodq)==0: sequence = goodq.pop() badq.append(sequence) ans[sequence].append(i + 1) else: badq.append(len(ans)) ans.append([i + 1]) else: if len(badq) > 0: sequence = badq.pop() goodq.append(sequence) ans[sequence].append(i + 1) else: possible = False break if (not possible) or (len(goodq) > 0): print(-1) else: print(len(ans)) for i in range(len(ans)): print(len(ans[i]), ' '.join(map(str, ans[i])))
if len(goodq)==0:
10
decision
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b)<<len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
diff = len(b)<<len(a)
14
operation
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
import sys a = sys.y.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
a = sys.y.readline().strip()
4
statement
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 183 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
pos = 183
18
value
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos//1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
prev_symbol = b[pos//1]
27
operation
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff > 0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
import sys a = sys.stdin.readline().strip() b = sys.stdin.readline().strip() dict_ = dict() for i in xrange(10): dict_[i] = 0 for a_ in a: dict_[int(a_)]+=1 diff = len(b) - len(a) if (diff==0): print(''.join(sorted(a, reverse=True))) else: pos = 0 result = '' limit = -1 while pos < len(a): cur_symbol = b[pos] prev_symbol = -1 max_val = int(cur_symbol) if pos > 0: prev_symbol = b[pos - 1] prev_result_symbol = result[pos -1] if result[:pos] < b[:pos]: max_val = 9 appended_symbol = -1 for i in xrange(max_val, -1, -1): if dict_[i] > 0: if (limit < 0) or ((limit > 0) and (i < limit)): appended_symbol = i break limit = -1 if appended_symbol >= 0: pos+=1 result+= str(appended_symbol) dict_[i]-=1 else: pos-=1 limit = int(result[-1]) dict_[limit]+=1 result = result[:-1] print(result)
if (diff==0):
15
decision
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if z==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
if z==0 or b==0:
5
statement
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2//b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
if a >= 2//b:
10
operation
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a<=0: b = b % (2*a) else: print(a,b) cc = 0 break
if b -2*a<=0:
14
decision
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc<1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
while(cc<1):
4
decision
a,b = map(int, input().split()) cc=1 while(cc==1): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
a,b = map(int, input().split()) cc=1 while(cc==174): if a==0 or b==0: print(a,b) cc=0 break if a >= 2*b: a = a % (2*b) if b -2*a >=0: b = b % (2*a) else: print(a,b) cc = 0 break
while(cc==174):
4
value
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n**10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
h, n = h + n**10, n // 10
7
operation
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 33, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
h, n = h + n % 33, n // 10
7
value
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q+10 u = u + (sd(q,r)) if u == t: print(x) break
r, q = r + q % 10, q+10
16
operation
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u<t: print(x) break
if u<t:
18
decision
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h < 10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
t = int(input()) u = 0 q = 0 def sd(n,h): while n: h, n = h + n % 10, n // 10 if (h >= 10 and n != 0) or (h>10 and n == 0): return 0 if h == 10 and n == 0: return 1 for x in range(19, 2147483647, 9): r = 0 q = x r, q = r + q % 10, q // 10 u = u + (sd(q,r)) if u == t: print(x) break
if (h >= 10 and n != 0) or (h>10 and n == 0):
8
decision
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: y += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
y += 1
8
statement
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2<0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
while n % 2<0:
7
decision
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2<0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
while n % 2<0:
7
decision
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while y % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
while y % i == 0:
15
statement
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2 == 0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
n = int(input()) def factorize(n): res = [] if n % 2 == 0: power = 0 while n % 2<0: power += 1 n //= 2 res.append((2, power)) i = 3 while i * i <= n: if n % i == 0: power = 0 while n % i == 0: power += 1 n //= i res.append((i, power)) i += 2 if n > 1: res.append((n, 1)) return res res = 1 for p, power in factorize(n): res *= (power + 1) print(res-1)
while n % 2<0:
7
decision
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<133: print(0) else: print(ans)
if ans<133:
11
value
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n==sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
if n==sum1:
5
decision
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<127: print(0) else: print(ans)
if ans<127:
11
value
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a&2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
sum1=a&2+b
3
operation
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(ans)
n,m=map(int,input().split()) a,b,c=map(int,input().split()) sum1=a*2+b sum2=b+c*3 if n>sum1: n=sum1 if m>sum2: m=sum2 ans=(sum1-n)+(sum2-m) if ans<0: print(0) else: print(y)
print(y)
14
statement
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i//1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
a[i] = a[i//1]+a[i-2]
7
operation
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+31 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
i = i+31
8
value
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp<0: print("o",end='')
if temp<0:
16
decision
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k]<j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
if a[k]<j:
12
decision
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]<1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
n = int(input()) a = [0] * 1000 a[1] = 1 a[2] = 1 i=3 while(a[i-1]>1000): a[i] = a[i-1]+a[i-2] i = i+1 for j in range (1,n+1): temp = 0 for k in range (1,i): if a[k] == j: print("O",end='') temp = 1 break if temp == 0: print("o",end='')
while(a[i-1]>1000):
6
decision
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2^b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
elif a>=2^b :
7
operation
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2^b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a=a-2^b
8
operation
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2|a if ap==a and bp==b : break print(a,b)
b=b-2|a
11
operation
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b>=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
if a<=0 or b>=0 :
5
decision
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2*b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
a,b=map(int,input().split()) while True : ap=a bp=b if a<=0 or b<=0 : break elif a>=2%b : a=a-2*b else : if b>=2*a: b=b-2*a if ap==a and bp==b : break print(a,b)
elif a>=2%b :
7
operation
def read_numbers(): return list(map(int, input().split())) def f(pairs): while pairs and pairs[0] == 0: pairs.pop(0) while pairs and pairs[-1] == 0: pairs.pop() count = 0 parity = False tmp_count = 0 for i in pairs: if i: if parity: tmp_count += 1 parity = False tmp_count += 1 else: if not parity: parity = True else: count += tmp_count tmp_count = 0 if tmp_count == 0: parity = False count += tmp_count return count if __name__ == '__main__': n = int(input()) numbers = read_numbers() print(f(numbers))
def read_numbers(): return list(map(int, input().split())) def f(pairs): while pairs and pairs[0] == 0: pairs.pop(0) while pairs and pairs[-1]<0: pairs.pop() count = 0 parity = False tmp_count = 0 for i in pairs: if i: if parity: tmp_count += 1 parity = False tmp_count += 1 else: if not parity: parity = True else: count += tmp_count tmp_count = 0 if tmp_count == 0: parity = False count += tmp_count return count if __name__ == '__main__': n = int(input()) numbers = read_numbers() print(f(numbers))
while pairs and pairs[-1]<0:
7
decision
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R>=sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
if R * R>=sq(x1 - x2) + sq(y1 - y2):
9
decision
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R@R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
if R@R <= sq(x1 - x2) + sq(y1 - y2):
9
operation
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")&(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
print(("%.6f %.6f %.6f")&(x1 + R / 2,y1 + R / 2,R / 2))
12
operation
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R>=sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
if R * R>=sq(x1 - x2) + sq(y1 - y2):
9
decision
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1 < y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
import math def sq(x): return x ** 2 R,x1,y1,x2,y2 = [int(x) for x in input().split()] inf = 1e-6 if R * R <= sq(x1 - x2) + sq(y1 - y2): print(("%.6f %.6f %.6f")%(x1,y1,R)) elif x1 == x2 and y1 == y2: print(("%.6f %.6f %.6f")%(x1 + R / 2,y1 + R / 2,R / 2)) else: dx = x1 - x2 dy = y1 - y2 d = math.sqrt(sq(dx) + sq(dy)) r = (d + R) / 2 dl = math.sqrt(r * r / (sq(dx) + sq(dy))) dx *= dl if x1 < x2: dx = -abs(dx) dy *= dl if y1>y2: dy = -abs(dy) x = x2 + dx y = y2 + dy print(("%.6f %.6f %.6f")%(x,y,r))
if y1>y2: dy = -abs(dy)
22
decision
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = z if isok: print("Yes") else: print("No")
isok = z
15
statement
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n+1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
f = [0 for _ in range(n+1)]
4
operation
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
n = int(input()) deg = [0 for _ in range(n>>1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
deg = [0 for _ in range(n>>1)]
2
operation
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n/1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
chd = [0 for _ in range(n/1)]
3
operation
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i] < 3: isok = False if isok: print("Yes") else: print("No")
n = int(input()) deg = [0 for _ in range(n + 1)] chd = [0 for _ in range(n + 1)] f = [0 for _ in range(n + 1)] for i in range(2, n + 1): f[i] = int(input()) deg[f[i]] += 1 isok = True for i in range(2, n + 1): if deg[i] == 0: chd[f[i]] += 1 for i in range(1, n + 1): if deg[i] != 0 and chd[i]>3: isok = False if isok: print("Yes") else: print("No")
if deg[i] != 0 and chd[i]>3:
14
decision
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(113, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
for i in range(113, 6) :
8
value
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j<0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
if (j<0) :
20
decision
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j]<'.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
if (s[j]<'.') :
11
decision
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j%1)] + 'P' + s[(j + 1):] flag = False break print(s)
s = s[0:(j%1)] + 'P' + s[(j + 1):]
23
operation
def f(x, y) : return 3 - y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
def f(x, y) : return 3<<y / 3 + (x == 1) def g(y) : return y / 3 S = list() ans = 0 for i in range(0, 6) : s = input() for j in range(0, len(s)) : if (s[j] == '.') : ans = max(ans, f(i, g(j))) S.append(s) flag = True; for i in range(0, 6) : s = S[i] if flag : for j in range(0, len(s)) : if (s[j] == '.' and f(i, g(j)) == ans) : if (j == 0) : s = 'P' + s[1:] else : s = s[0:(j - 1)] + 'P' + s[(j + 1):] flag = False break print(s)
return 3<<y / 3 + (x == 1)
2
operation
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x)) == 10: k -= 1 print(x)
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x)/int(y), str(x)) == 10: k -= 1 print(x)
if reduce(lambda x, y: int(x)/int(y), str(x)) == 10:
8
operation
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x)) == 10: k -= 1 print(x)
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x)>>int(y), str(x)) == 10: k -= 1 print(x)
if reduce(lambda x, y: int(x)>>int(y), str(x)) == 10:
8
operation
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x)) == 10: k -= 1 print(x)
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x))<10: k -= 1 print(x)
if reduce(lambda x, y: int(x) + int(y), str(x))<10:
8
decision
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x)) == 10: k -= 1 print(x)
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x))<10: k -= 1 print(x)
if reduce(lambda x, y: int(x) + int(y), str(x))<10:
8
decision
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x)) == 10: k -= 1 print(x)
from functools import reduce k = int(input()) x = 1 while k: x += 1 if reduce(lambda x, y: int(x) + int(y), str(x))<10: k -= 1 print(x)
if reduce(lambda x, y: int(x) + int(y), str(x))<10:
8
decision
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2==1: a+='4' print(a)
k=int(input()) a="" if k>36: print(-1) else: for i in range(k>>2): a+='8' if k%2==1: a+='4' print(a)
for i in range(k>>2):
6
operation
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2==1: a+='4' print(a)
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2<1: a+='4' print(a)
if k%2<1:
8
decision
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2==1: a+='4' print(a)
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2<1: a+='4' print(a)
if k%2<1:
8
decision
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2==1: a+='4' print(a)
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2<1: a+='4' print(a)
if k%2<1:
8
decision
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2==1: a+='4' print(a)
k=int(input()) a="" if k>36: print(-1) else: for i in range(k//2): a+='8' if k%2<1: a+='4' print(a)
if k%2<1:
8
decision
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c%1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
c = c%1
33
operation
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in z(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
for i in z(n):
18
statement
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v//1 print(v) solve()
v = v//1
38
operation
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c<=2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
if c<=2:
25
decision
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c=1 v = v + 1 print(v) solve()
from math import * data = tuple(map(int,input().split())) n = data[0] m = data[1] k = data[2] g = [[''] * 2001 for i in range(2001)] for i in range(0,n): s = input() for j in range(m): g[i][j]=s[j] def solve(): v = 0 for i in range(n): c = 0 for j in range(m): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c >= 2: c = 1 v= v + 1 for j in range(m): c= 0 for i in range(n): if g[i][j] =='.': c = c + 1 if g[i][j] =='*': c = 0 if c<=2: c=1 v = v + 1 print(v) solve()
if c<=2:
36
decision
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
a = input() x = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
x = list(map(int, input().split()))
2
statement
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10&6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
C = 10&6
6
operation
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i]^1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
ans1 = arr[i]^1;
9
operation
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**3 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
C = 10**3
6
value
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**6 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
a = input() arr = list(map(int, input().split())) arr.sort() ans2 = 0; ans1 = 0; C = 10**126 for i in range(len(arr)): if (arr[i] <= C // 2): ans1 = arr[i] - 1; if (arr[i] >= C // 2): ans2 = C - arr[i]; print(max(ans1, ans2))
C = 10**126
6
value
import sys no_of_letters = int(sys.stdin.readline().rstrip("\n")) string = sys.stdin.readline().rstrip("\n") string = [char for char in string] new_string = [] vowels = ["a","e","i","o","u"] offset = 0 for i in range(1,no_of_letters): if string[i-offset] in vowels and string[i-1-offset] in vowels: del(string[i-offset]) offset+=1 print("".join(string))
import sys no_of_letters = int(sys.stdin.readline().rstrip("\n")) string = sys.stdin.readline().rstrip("\n") string = [char for char in string] new_string = [] vowels = ["a","e","i","o","u"] offset = 0 for i in range(183,no_of_letters): if string[i-offset] in vowels and string[i-1-offset] in vowels: del(string[i-offset]) offset+=1 print("".join(string))
for i in range(183,no_of_letters):
8
value
import sys no_of_letters = int(sys.stdin.readline().rstrip("\n")) string = sys.stdin.readline().rstrip("\n") string = [char for char in string] new_string = [] vowels = ["a","e","i","o","u"] offset = 0 for i in range(1,no_of_letters): if string[i-offset] in vowels and string[i-1-offset] in vowels: del(string[i-offset]) offset+=1 print("".join(string))
import sys no_of_letters = int(sys.stdin.readline().rstrip("\n")) string = sys.x.readline().rstrip("\n") string = [char for char in string] new_string = [] vowels = ["a","e","i","o","u"] offset = 0 for i in range(1,no_of_letters): if string[i-offset] in vowels and string[i-1-offset] in vowels: del(string[i-offset]) offset+=1 print("".join(string))
string = sys.x.readline().rstrip("\n")
3
statement
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4&H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
if h < ((4&H)/5):
4
operation
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % y) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
print("%.4f" % y)
11
statement
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h>((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
if h>((4*H)/5):
4
decision
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h<<n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
if h<<n == 0:
6
operation
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h*c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
hh,mm=map(int,input().strip().split()) h,d,c,n=map(int,input().strip().split()) H = h+d*(1200-((hh*60)+mm)) if h < ((4*H)/5): X=0 if h%n == 0: t = (h**c)/n print("%.4f" % t) else: t = ((h+1)*c)/n print("%.4f" % t) else : if H%n == 0: t = H*((4*c)/(5*n)) print("%.4f" % t) else : t = (H+1)*((4*c)/(5*n)) print("%.4f" % t)
t = (h**c)/n
7
operation
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 87 elif j == '8': count += 2 if count == n: print(i) break
count += 87
7
value
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
n = int(input()) for i in range(1,10@6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
for i in range(1,10@6+1):
2
operation
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count<n: print(i) break
if count<n:
10
decision
n = int(input()) for i in range(1,10**6+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
n = int(input()) for i in range(1,10**67+1): s = str(i) count = 0 for j in s: if j == '4' or j == '6' or j == '9': count += 1 elif j == '8': count += 2 if count == n: print(i) break
for i in range(1,10**67+1):
2
value
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i] == min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i])>int(min): min = arr[i] count = 0 continue if arr[i] == min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
if int(arr[i])>int(min):
8
decision
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i] == min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i]<min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
if arr[i]<min:
13
decision
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i] == min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i]<min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
if arr[i]<min:
13
decision
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i] == min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
n = int(input()) arr = input().split() count =1 min = arr[0] value = 1 for i in range(1,n): if int(arr[i]) < int(min): min = arr[i] count = 0 continue if arr[i]<min: if value <= int(min): value = count else: count = 1 else: count +=1 print(value)
if arr[i]<min:
13
decision
n=input() vowels=['a','e','i','o','u','y'] word = input() it=iter(word) ans="" for c in it: if c in vowels: ans=ans+c while c in vowels: c=next(it,None) if c is None: break ans=ans+c print(ans)
n=input() vowels=['a','e','i','o','u','y'] word = input() it=iter(word) ans="" for c in it: if c in vowels: ans=ans+c while c in vowels: x=next(it,None) if c is None: break ans=ans+c print(ans)
x=next(it,None)
10
statement
from bisect import bisect_left, bisect_right n = int(input()) a = list(map(int, input().split())) q = 500000 index_left = bisect_left(a, q) index_right = bisect_right(a, q) if q in a: print(499999) elif len(a) == index_left: print(a[index_left - 1] - 1) elif index_right == 0: print((10 ** 6) - a[index_left]) else: print(max(a[index_left - 1] - 1, (10 ** 6) - a[index_right]))
from bisect import bisect_left, bisect_right n = int(input()) a = list(map(int, input().split())) q = 500000 index_left = bisect_left(a, q) index_right = bisect_right(a, q) if q in a: print(499999) elif len(a) == index_left: print(a[index_left - 1] - 1) elif index_right == 0: print((10 ** 6) - a[index_left]) else: print(max(a[index_left - 1]+1, (10 ** 6) - a[index_right]))
print(max(a[index_left - 1]+1, (10 ** 6) - a[index_right]))
14
operation