problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02684
s929080175
Accepted
n, K = map(int, input().split()) As = list(map(int, input().split())) # doubling m = 0 while 2**m < K: m += 1 d = [[0] * n for i in range(m)] for i in range(n): d[0][i] = As[i] - 1 for k in range(m-1): for i in range(n): d[k+1][i] = d[k][d[k][i]] now = 0 for k in range(m): if (K >> k) & 1: now = d[k][now] print(now+1)
p04012
s224138911
Accepted
w = list(input()) a = list("abcdefghijklmnopqrstuvwxyz") f = 0 for i in range(26): if w.count(a[i]) % 2 == 1: f = 1 print("Yes" if f == 0 else "No")
p04033
s989408616
Wrong Answer
a,b = map(int, input().split()) mafs = 0 if a < 1: print(0) else: for i in range(a, b+1): mafs *= i print(mafs)
p02818
s092163585
Accepted
A,B,K = map(int, open(0).read().split()) if K <= A: print(A-K,B) elif K >= A + B: print(0,0) else: print(0,B-K+A)
p02629
s016593237
Accepted
import sys import math import string ALPHABET = string.ascii_lowercase result = [] def alphabet_decimal(v): quotient = math.floor(v / len(ALPHABET)) surplus = v % len(ALPHABET) quotient -= 1 if surplus == 0 else 0 surplus = len(ALPHABET) if surplus == 0 else surplus result.append(surplus) if len(ALPHABET) < quotient: alphabet_decimal(quotient) elif len(ALPHABET) < v: result.append(quotient) return "".join([ALPHABET[i - 1] for i in reversed(result)]) print(alphabet_decimal(int(input())))
p03693
s996789486
Accepted
a,b,c=map(int,input().split()) if (b*10+c)%4==0: print("YES") else: print("NO")
p02556
s278226865
Accepted
n=int(input()) xy=[[int(_) for _ in input().split()]for i in range(n)] print(max(max([a[0]+a[1] for a in xy])-min([a[0]+a[1] for a in xy]),max([a[0]-a[1] for a in xy])-min([a[0]-a[1] for a in xy]))) # print(max([a[0]-a[1] for a in xy])-min([a[0]-a[1] for a in xy]))
p03815
s139098435
Wrong Answer
X = int(input()) ans = (X // (5 + 6)) * 2 if X % (5 + 6) <= 6: ans += 1 else: ans += 2 print(ans)
p03284
s852694299
Accepted
N, K = map(int, input().split()) if N % K != 0: print(1) else: print(0)
p02994
s447900000
Wrong Answer
import sys input = sys.stdin.readline class AtCoder: def main(self): N, L = map(int, input().split()) total = N * L - N + N * (N + 1) // 2 if L < 0: if L + N >= 0: print(total + 1) else: print(total - (L + N - 1)) else: print(total - L) # Run main if __name__ == '__main__': AtCoder().main()
p03037
s496397700
Accepted
n, m = map(int, input().split()) l_max = 0 r_min = 10**9 for i in range(m): l, r = map(int, input().split()) l_max = max(l_max, l) r_min = min(r_min, r) ans = 0 for i in range(l_max, r_min+1): ans += 1 print(ans)
p02683
s863735157
Wrong Answer
import numpy as np N, M, X = map(int, input().split()) a = np.array([input().split() for l in range(N)], dtype=np.int64) sum = np.sum(a, axis=0) sum = sum[1:M+1] if np.min(sum)<X: print(-1)
p03821
s158385376
Wrong Answer
N = int(input()) A = [] B = [] for i in range(N): a, b = map(int, input().split()) A.append(a) B.append(b) A = A[::-1] B = B[::-1] count = 0 for i in range(N): if A[i] % B[i] != 0: count += (B[i] - (A[i] + count) % B[i]) print(count)
p03408
s392717840
Wrong Answer
n=int(input()) s=[input() for i in range(n)] m=int(input()) t=[input() for i in range(m)] l=list(set(s)) print(max(0,s.count(l[i])-t.count(l[i])) for i in range(len(l)))
p03219
s089087977
Accepted
X,Y =map(int,input().split()) print(int(X+Y/2))
p02753
s391942915
Accepted
S = input() if (S == "AAA"): print("No") elif (S == "BBB"): print("No") else: print("Yes")
p03944
s142667825
Accepted
w, h, n = map(int,input().split()) p = [list(map(int,input().split())) for i in range(n)] l, r, b, t = 0, w, 0, h for i in range(n): if p[i][2] == 1: l = max(l, p[i][0]) if p[i][2] == 2: r = min(r, p[i][0]) if p[i][2] == 3: b = max(b, p[i][1]) if p[i][2] == 4: t = min(t, p[i][1]) W = r-l if r > l else 0 H = t-b if t > b else 0 print(W*H)
p03150
s549084172
Accepted
s = input() if any(s[:i]+s[-7+i:] == 'keyence' for i in range(8)): print('YES') else: print('NO')
p02819
s218664189
Accepted
x = int(input()) num = 0 for i in range(x,x*2): for j in range(2,x//2): if i%j == 0: num += 1 continue if num == 0: print(i) exit(0) num = 0
p03145
s845272561
Accepted
ab,bc,ca = map(int,input().split()) print(ab * bc // 2)
p03478
s895875885
Wrong Answer
n, a, b = map(int, input().split()) ans = 0 for x in range(n + 1): sum = 0 temp = x for id in range(4): sum += temp % 10 if temp < 10: break else: temp //= 10 if a <= sum <= b: ans += x print(ans)
p03379
s776962057
Wrong Answer
n = int(input()) X = list(map(int, input().split())) x = sorted(X) res1 = x[n//2] res2 = x[n//2 -1] for i in range(n): if x[i] >= res1: print(res2) elif x[i] <= res2: print(res1)
p02694
s844215435
Accepted
import math X = int(input()) A = 100 t = 0 while A < X: A *= 1.01 A = math.floor(A) t += 1 print(t)
p02832
s022575960
Accepted
n = int(input()) alst = list(map(int, input().split())) if 1 not in alst: print(-1) exit() ans = 0 for num in alst: if num == ans + 1: ans += 1 else: print(n - ans)
p02959
s898026148
Wrong Answer
n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = 0 for i in range(n): if b[i] <= a[i]: c = c + b[i] else: c = c + a[i] + min(b[i]-a[i],a[i+1]) print(c)
p03338
s164305960
Wrong Answer
N=int(input()) S=input() ans=0 for i in range(N): X=list(S[:i]) Y=list(S[i+1:]) ans=max(ans,len(set(X)&set(Y))) print(ans)
p03705
s778611610
Accepted
import sys sys.setrecursionlimit(10 ** 5 + 10) def input(): return sys.stdin.readline().strip() def resolve(): N,A,B=map(int,input().split()) if A>B: print(0) elif N==1: if A!=B: print(0) else: print(1) elif N>=2: res=N-2 print(B*res-A*res+1) resolve()
p03672
s175548543
Accepted
s=list(input()) while len(s)!=0: s.pop(len(s)-1) if s[:len(s)//2]*2==s: break print(len(s))
p03371
s004803495
Accepted
a,b,c,x,y = map(int,input().split()) ans = a*x+b*y for i in range(10**5+1): tmp = 2*c*i+max(0,x-i)*a+max(0,y-i)*b ans = min(ans,tmp) print(ans)
p03472
s948158475
Accepted
n,h = map(int,input().split()) a = [] b = [] ans = 0 for i in range(n): A,B = map(int,input().split()) a.append(A) b.append(B) b = sorted(b, reverse=True) a_max = max(a) for i in b: if h>0: if i>a_max: h-=i ans+=1 else: print(ans) exit() if h<0: print(ans) else: ans += -(-h//max(a)) print(ans)
p02792
s864246337
Accepted
n = int(input()) res = 0 list_ = [[0 for j in range(10)] for i in range(10)] for i in range(1, n + 1): s = list(str(i)) initl = int(s[0]) end = int(s[-1]) list_[initl][end] += 1 for i in range(1, 10): for j in range(1, 10): res += list_[i][j] * list_[j][i] print(res)
p02743
s270162053
Accepted
a,b,c = map(int, input().split()) if c - a - b < 0: print("No") exit() if 4*a*b < (c-a-b)**2: print("Yes") else: print("No")
p02594
s956796115
Accepted
print("YNeos"[int(input())<30::2])
p02796
s176873821
Accepted
def main(): n = int(input()) L = [] for _ in range(n): x,l = map(int,input().split()) L.append([x+l,x-l]) L.sort() cnt = 0 right = -10**9 for r,l in L: if right <= l: cnt += 1 right = r print(cnt) main()
p02784
s604602716
Accepted
h,n = map(int,input().split()) a = list(map(int,input().split())) sum=0 for i in range(n): sum += a[i] if h <= sum: print('Yes') else: print('No')
p02899
s181273698
Accepted
n=int(input()) a=[int(x) for x in input().rstrip().split()] ans=[0 for i in range(n)] for i in range(n): ans[a[i]-1]=i+1 print(*ans)
p02897
s466892679
Accepted
from math import ceil n = int(input()) print(ceil(n/2)/n)
p02713
s187187130
Accepted
#coding:utf-8 from math import gcd def main(): k = int(input()) ans = 0 for a in range(1, k+1): for b in range(1, k+1): for c in range(1, k+1): ans += gcd(gcd(a, b), c) print(ans) if __name__ == "__main__": main()
p02640
s035365052
Wrong Answer
x,y=map(int,input().split()) a=y a -= 2*x if a < 0 or a >= 2*x: print("No") else: print("Yes")
p02720
s624288177
Accepted
K = int(input()) r = [[] for _ in range(10)] r[0] = list(range(1,10)) for i in range(9): for a in r[i]: s = str(a) d = a%10 for j in range(d-1,d+2): if not 0 <= j <= 9: continue r[i+1].append(int(s+str(j))) for i in range(10): if K >= len(r[i]): K -= len(r[i]) else: print(r[i][K-1]) break
p02947
s001901559
Accepted
N = int(input()) l = [] for i in range(N): l.append(''.join(sorted(input()))) l.sort() count = ans = 0 for i in range(N-1): if (l[i] == l[i+1]): count += 1 ans += count else: count = 0 print(ans)
p03150
s593528629
Wrong Answer
s=input() a="keyence" b=0 flug=0 for i in s: if i==a[b]: b+=1 if flug==1: flug=2 else: if flug==0: flug=1 elif flug==2: print("NO") exit() if b==7: print("YES") exit() print("NO")
p03605
s728170395
Accepted
S=input() if '9' in S: print('Yes') else: print('No')
p02707
s147233572
Accepted
n = int(input()) dicti = {} boss = list(map(int, input().split())) for i in boss: if i in dicti: dicti[i] += 1 else: dicti[i] = 1 #print(dicti) for j in range(1,n+1): try: print(dicti[j]) except: print(0)
p03745
s776253354
Accepted
N=int(input()) A=list(map(int,input().split())) i=0 a=1 t=0 while i<N-1: if A[i]<A[i+1]: if t==-1: a+=1 t=0 elif not t: t=1 elif A[i]>A[i+1]: if t==1: a+=1 t=0 elif not t: t=-1 i+=1 print(a)
p03448
s816826710
Wrong Answer
a = int(input()) b = int(input()) c = int(input()) x = int(input()) cnt = 0 for i in range(a): for j in range(b): for k in range(c): ans = i*500 + j*100 + k*50 if ans == x: cnt += 1 print(cnt)
p03548
s578605918
Wrong Answer
x,y,z = map(int, input().split()) n = x//(y+z) if x - (y+z)*n >= y: print(n+1) else: print(n)
p02819
s763213081
Accepted
X = int(input()) while True: for x in range(2,X): if X%x == 0: X +=1 break else: print(X) break
p02602
s172976984
Accepted
n,k=map(int,input().split()) lst_1=list(map(int,input().split())) # print(lst_1) for i in range(n-k): if(lst_1[i+k]>lst_1[i]): print("Yes") else:print("No")
p03544
s286634064
Wrong Answer
N = int(input()) L0 = 2 L1 = 1 if N == 1: print(L1) for i in range(2, N + 1): L0, L1 = L1, L0 + L1 print(L1)
p02953
s614643339
Wrong Answer
input() H = [int(i) for i in input().rstrip().split(' ')] N = len(H) for i in range(0,N): a = H[i] b = H[i - 1] if i > 0 else 0 n = H[i + 1] if i < N -1 else 10**9 print(i,"#",b,a,n) if n == a - 1: if b == a: print("No") break else: H[i] -= 1 elif n < a - 1: print("No") break else: print("Yes") print(H)
p03644
s675566275
Accepted
import numpy as np N=int(input()) print(2**int(np.log2(N)))
p02615
s229707037
Accepted
import queue N = int(input()) U = input().split() l = [0 for i in range(N)] for i in range(N): l[i]= int(U[i]) l.sort() l.reverse() ans = 0 if N%2 == 0: for i in range(N//2): ans += 2*l[i] ans -= l[0] else: for i in range(1,(N+1)//2-1): ans += 2*l[i] ans += l[0]+l[(N+1)//2-1] print(ans)
p04043
s592349750
Accepted
a,b,c = map(int,input().split()) print("YES" if a*b*c ==175 else "NO")
p03127
s632465866
Wrong Answer
n=int(input()) a=list(map(int,input().split())) min_num=min(a) for i in a: if i==min_num: continue else: if i%min_num!=0: print(1) exit() print(min_num)
p02790
s531986364
Accepted
a, b = map(int, input().split()) if a > b: for i in range(0,a): print(b,end="") else: for i in range(0,b): print(a,end="")
p03285
s180493214
Accepted
N = int(input()) for i in range(100): for j in range(100): if i*4+j*7 == N: print("Yes") exit() print("No")
p02909
s825757922
Accepted
Weather = ['Sunny','Cloudy','Rainy'] print(Weather[(Weather.index(input()) + 1) % 3])
p02753
s596625405
Wrong Answer
S = input() if S == 'AAA' or S == 'BBB': print('NO') else: print('Yes')
p03219
s659456626
Accepted
X,Y = map(int,input().split()) print(X+(Y//2))
p04043
s009808780
Accepted
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) def lcm(a,b): return a*b//math.gcd(a,b) sys.setrecursionlimit(10**9) mod = 10**9+7 A = l() A.sort() if A == [5,5,7]: print('YES') else: print('NO')
p02753
s205260783
Wrong Answer
S = input() if 'A' and 'B' in S: print('Yes') else: print('No')
p02570
s898594918
Accepted
d,t,s=map(int,input().split()) if d/s<=t:print("Yes") else:print("No")
p02684
s973009512
Accepted
N, K = map(int, input().split()) A = list(map(int, input().split())) dic = {} list_town = [] set_town = set() town = 1 for i, v in enumerate(A): dic[i+1] = v for _ in range(K): list_town.append(town) set_town.add(town) town = dic[town] if town in set_town: stop_town = town break if N <= K: list_first_split = list_town[:list_town.index(stop_town)] list_second_split = list_town[list_town.index(stop_town):] print(list_second_split[(K - (len(list_first_split))) % len(list_second_split)]) else: print(town)
p02959
s707218696
Accepted
n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) ans = 0 for i in range(n): f = min(a[i],b[i]) ans += f a[i] -= f g = min(a[i+1],b[i]-f) ans += g a[i+1] -= g print(ans)
p02661
s937157267
Accepted
def median(array): tmp = sorted(array) if len(array) % 2: return tmp[len(array)//2] else: return (tmp[len(array)//2] + tmp[len(array)//2 - 1]) / 2 [n], *x = [[*map(int, t.split())] for t in open(0)] a, b = zip(*x) if n % 2 == 0: print(int(2*(median(b) - median(a)) + 1)) else: print(median(b) - median(a) + 1)
p03062
s974999279
Accepted
n = int(input()) a = list(map(int, input().split())) cnt = [1 for x in a if x < 0] ans = 0 mini = float("inf") for i in a: if i < 0: i *= -1 mini = min(mini, i) ans += i if sum(cnt) % 2 == 0: print(ans) else: print(ans - mini * 2)
p03548
s496593211
Accepted
x,y,z=map(int,input().split()) print((x-z)//(y+z))
p02729
s695972173
Wrong Answer
a, b = list(map(int, input().strip().split())) # 2整数を受け取った s1 = a * (a - 1) /2 #偶どうし s2 = b * (b - 1) /2 #奇どうし # 出力 print(s1 + s2)
p02606
s711389051
Accepted
L, R, d = map(int, input().split()) out = 0 for i in range(L, R + 1): out += 1 if i % d == 0 else 0 print(out)
p02792
s615534813
Accepted
n = int(input()) m = [0]*100 for i in range(1,n+1): if str(i)[-1] != "0": m[((int(str(i)[0])) * 10)+(int(str(i)[-1]))] += 1 res = sum([m[i]*m[int(str(i)[::-1])] for i in range(100)]) print(res)
p03435
s073942727
Wrong Answer
l1=list(map(int,input().split())) l2=list(map(int,input().split())) l3=list(map(int,input().split())) l=[l1,l2,l3] c=l[0][0] for i in range(3): for j in range(3): l[i][j] -=c print(l) if (l[1][1]==l[0][1]+l[1][0]) and (l[2][1]==l[0][1]+l[2][0]) and (l[1][2]==l[0][2]+l[1][0])and (l[2][2]==l[2][0]+l[0][2]): print('Yes') else: print("No")
p02882
s667428256
Accepted
from math import degrees, atan a, b, x = map(int, input().split()) if 2 * x > a * a * b: ans = degrees(atan(2 * ((b / a) - (x / (a ** 3))))) else: ans = degrees(atan(a * b * b / (2 * x))) print(ans)
p03309
s755002724
Wrong Answer
n = int(input()) a = list(map(int, input().split())) for i in range(n): a[i] -= i+1 b = round(sum(a)/n, 0) ans = 0 for i in range(n): ans += abs(a[i]-b) print(ans)
p03043
s733530662
Accepted
n, K = map(int, input().split()) p = 1/n ans = 0 for result in range(1, n+1): # result = 1,2,3 k = K k /= result cnt = 0 while k > 1: k /= 2 cnt += 1 ans += p * (0.5)**cnt print(ans)
p02584
s655445728
Accepted
X,K,D = map(int,input().split()) if X < 0: X = -X A = X // D if A > K: print(X - (K*D)) else: B = X % D KK = K - A if KK % 2 == 1: print(abs(B-D)) elif KK % 2 == 0: print(abs(B))
p03211
s451041124
Accepted
N = input() L = [] A = [] for i in range (len(N)-2): L.append(N[i]+N[i+1]+N[i+2]) for j in range(len(L)): A.append(abs(int(L[j])-753)) print(min(A))
p03611
s815744342
Wrong Answer
n = int(input()) A = list(map(int, input().split())) A = sorted(A) from bisect import bisect_left ans = 0 for i in range(1, A[-1]): cnt = bisect_left(A, i+2) - bisect_left(A, i-1) ans = max(ans, cnt) #print(i, cnt) print(ans)
p03380
s796889438
Wrong Answer
import bisect import math n = int(input()) l = sorted(list(map(int,input().split()))) if len(l)==2 : print(l[-1],l[-2]) exit() a = l[-1]/2 s = bisect.bisect_left(l,a) if l[s]==a: print(l[-1],l[s]) exit() k1 = l[s-1] k2 = l[s] s1 = a-k1 if k2==l[-1]: k2 = k1 s2 = a-k2 if s1<=s2: print(l[-1],k1) else: print(l[-1],k2)
p03282
s748996936
Accepted
S=str(input()) K=int(input()) first_number=1 location=0 for i in range(len(S)): if int(S[i]) != 1: first_number = S[i] location = i break if K <= location: print(1) else: print(first_number)
p02995
s759453111
Accepted
def cnt(A, B, X): A1 = -(-A // X) B1 = B // X return B1 - A1 + 1 def gcd(A, B): mul = A * B if A < B: A, B = B, A while B: A, B = B, A % B return mul // A A, B, C, D = map(int,input().split()) print((B - A + 1) - cnt(A, B, C) - cnt(A, B, D) + cnt(A, B, gcd(C, D)))
p03639
s213968216
Accepted
n=int(input()) a=list(map(int, input().split())) cnt_2=0 cnt_1=0 cnt_0=0 for num in a: if num%4==0: cnt_2+=1 elif num%2==0: cnt_1+=1 else: cnt_0+=1 if cnt_1==0: if cnt_2+1>=cnt_0: print("Yes") else: print("No") else: if cnt_2>=cnt_0: print("Yes") else: print("No")
p02836
s739780398
Accepted
s = str(input()) n = len(s) t = s[::-1] ans = 0 for i in range(n//2): if s[i] != t[i]: ans += 1 print(ans)
p02570
s056866987
Wrong Answer
d,t,s = map(int,input().split()) if d // s <= t: print('Yes') else: print('No')
p03293
s190897279
Accepted
s = input() t = input() print("YNeos"[s not in t*3::2])
p03146
s942746727
Accepted
s = int(input()) ans = 0 while s not in [1,2,4]: ans+=1 if s%2: s = 3*s+1 else: s//=2 print(ans+4)
p03625
s158397090
Accepted
import heapq from collections import Counter n = int(input()) a = list(map(int, input().split())) c = Counter(a) l = [] for i in set(a): if c[i] >= 2: for j in range(c[i]//2): l.append(i) if len(l) >= 2: print(heapq.nlargest(2, l)[0]*heapq.nlargest(2, l)[1]) else: print(0)
p02665
s560372553
Wrong Answer
n=int(input()) a=list(map(int,input().split())) if a[0]:exit(print(-1)) b=[1] for i in range(1,n+1): b.append(b[-1]*2-a[i]) if min(b)<0:exit(print(-1)) b[-1]=a[-1] for i in range(n,0,-1): b[i-1]=min(b[i-1],b[i]) b[i-1]+=a[i-1] print(sum(b))
p03438
s043985199
Wrong Answer
n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) cnt1=[0]*n cnt2=[0]*n for i in range(n): if a[i]>b[i]: cnt2[i]=a[i]-b[i] else: num4=b[i]-a[i] cnt1[i]=num4//2 cnt2[i]=num4%2 num5=abs(sum(a)-sum(b)) if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5: print("Yes") else: print("No")
p03076
s459428553
Wrong Answer
import sys import itertools array = [ int(input()) for I in range(5) ] for I in array: if not ( 1 <= I <= 123 ): sys.exit() min = (123 * 5) + (10 * 5) for J in list(itertools.permutations(array)): time = 0 for K in J[0:-1]: time += round(K,-1) time += J[-1] if min > time: min = time print(min)
p02553
s429290856
Wrong Answer
a, b, c, d =map(int, input().split()) if 0 < b and 0 < d: print(b*d) elif 0 > b and 0 < d: print(b*c) elif 0 < b and 0 > d: print(a*d) else: print(a*c)
p03435
s050237376
Accepted
c = [list(map(int, input().split())) for _ in range(3)] a1 = 0 b1 = c[0][0] - a1 a2 = c[1][0] - b1 b2 = c[0][1] - a1 a3 = c[2][0] - b1 b3 = c[0][2] - a1 if a2 + b2 != c[1][1]: print("No") exit() if a2 + b3 != c[1][2]: print("No") exit() if a3 + b2 != c[2][1]: print("No") exit() if a3 + b3 != c[2][2]: print("No") exit() print("Yes")
p03071
s556379861
Accepted
a, b = map(int, input().split()) print(max(a, b) + max(max(a, b) - 1, min(a, b)))
p03243
s332534298
Accepted
n = int(input()) ans = 0 while ans<n: ans += 111 print(ans)
p02754
s773818418
Accepted
n, a, b = map(int, input().split()) div, rest =divmod(n, (a + b)) #div, rest ans = a * div if rest >= a: ans += a else: ans += rest print(ans)
p02696
s863569656
Wrong Answer
# coding: utf-8 # Your code here! A,B,N=map(int,input().split()) num=N//B if num==0: n=N else: n=B*num-1 temp1=(A*n)/B//1 temp2=A*((n/B)//1) print(temp1-temp2)
p02993
s123018888
Accepted
s = input() print('Bad' if s[0] == s[1] or s[1] == s[2] or s[2] == s[3] else 'Good')
p02842
s617637312
Accepted
import math n = int(input()) a = math.floor(n / 1.08) b = a + 1 aa = math.floor(a * 1.08) bb = math.floor(b * 1.08) if (aa == n): print(a) else: if (bb == n): print(b) else: print(':(')
p02601
s476659162
Accepted
a, b, c = map(int, input().split()) k = int(input()) cnt = 0 while b <= a: b *= 2 cnt += 1 while c <= b: c *= 2 cnt += 1 if cnt <= k: print("Yes") else: print("No")
p03323
s331288139
Accepted
A, B = map(int, input().split()) if A <= 8 and B <= 8: print("Yay!") else: print(":(")