problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02899
s181159970
Accepted
n=int(input()) a=list(map(int,input().split())) ans=[0]*n for i in range(n): ans[a[i]-1]=i+1 print(*ans)
p02701
s785742218
Wrong Answer
import collections N=int(input()) list=[input() for i in range(N)] c= collections.Counter(list) m=0 for i in c.values(): m+=i print(m)
p03680
s868699368
Accepted
N = int(input()) done = [0] * N button = [int(input()) for _ in range(N)] done[0] = 1 i = 0 ans = 1 for _ in range(N): i = button[i] - 1 if i == 1: print(ans) exit() if done[i] == 1: print(-1) exit() else: done[i] = 1 ans += 1
p03241
s345879830
Accepted
n, m = map(int, input().split()) result = 1 for i in range(int(m**0.5), 0, -1): if m % i == 0: j = m // i if i >= n: result = max(result, j) elif j >= n: result = max(result, i) print(result)
p03797
s668931649
Accepted
n, m = map(int, input().split()) ans = 0 if m >= n*2: m -= n*2 ans += n ans += m // 4 else: ans += m // 2 print(ans)
p03639
s927427223
Accepted
n = int(input()) al = list(map(int, input().split())) n0, n2, n4 = 0, 0, 0 for a in al: if a % 4 == 0: n4 += 1 elif a % 2 == 0: n2 += 1 else: n0 += 1 print('Yes' if n4+1 >= n0+n2%2 else 'No')
p02836
s318972031
Accepted
s = str(input()) length = len(s) n = length//2 m = 0 for i in range(n): x = (i+1)*(-1) if s[i]!=s[x]: m += 1 print(m)
p03860
s489848426
Wrong Answer
s=input() print("A"+s+"B")
p03673
s006378393
Accepted
n=int(input()) a=list(map(int,input().split())) if n%2==0: for i in range(n-1,0,-2): print(a[i],end=" ") for i in range(0,n,2): print(a[i],end=" ") else: for i in range(n-1,-1,-2): print(a[i],end=" ") for i in range(1,n,2): print(a[i],end=" ")
p02859
s760115921
Accepted
r=input() R=int(r) bai=int(R**2) print(bai)
p02811
s532024688
Wrong Answer
a = input().split() print(a) print(a[0]) K = int(a[0]) X = int(a[1]) if 500 * K >= X: print('Yes') else: print('No')
p03160
s953731222
Wrong Answer
N = int(input()) h = list(map(int,input().split())) cost = [1000000]*(N+10) cost[0] = 0 for i in range(1, N): cost[i] = min((abs(h[i-1] - h[i]) + cost[i-1]),cost[i]) if i >= 2: cost[i] = min((abs(h[i-2] - h[i]) + cost[i-2]), cost[i]) print(cost[N-1])
p03387
s177105235
Wrong Answer
a = list(map(int, input().split())) s, m, b = sorted(a) cnt = 0 m_s = m - s if m_s % 2 == 0 and m < b and m_s != 0: cnt += m_s // 2 s += m_s elif m_s % 2 == 1 and m < b: cnt += 1 s += 1 b += 1 b_m = b - m cnt += b_m print(cnt)
p03011
s161187240
Accepted
a = list(map(int, input().split())) a.sort() print(a[0]+a[1])
p02691
s360555331
Accepted
n = int(input()) arr = list(map(int,input().split())) addarr = [i+1+arr[i] for i in range(n)] diffarr = [i+1-arr[i] for i in range(n)] from collections import Counter cnt = Counter([addarr[0]]) ans = 0 for i in range(1,n): tmp = diffarr[i] ans += cnt[tmp] cnt.update([addarr[i]]) print(ans)
p03407
s244418135
Accepted
a,b,c = (int(x) for x in input().split()) if a+b < c: print ('No') else: print ('Yes')
p04031
s941988159
Wrong Answer
def resolve(): n = int(input()) ans = 1000000 a = list(map(int, input().split())) for i in range(-100, 101): tmp = 0 for j in a: tmp += (j-i)**2 if tmp < ans: ans = tmp print(ans)
p03471
s486512988
Accepted
n , y = map(int, input().split()) i = y//10000 j = y//5000 k = y//1000 for p in range(i+1): for q in range(j+1): if (n-p-q)>=0 and (p*10000)+(q*5000)+((n-p-q)*1000)==y: print(p, q, n-p-q) exit() print(-1, -1, -1)
p03107
s114189691
Accepted
S = input() stack = [] cnt = 0 for s in S: if len(stack) == 0: stack.append(s) elif len(stack) > 0 and stack[-1] != s: stack.pop() cnt += 2 else: stack.append(s) print(cnt)
p03251
s277058199
Accepted
N,M,X,Y=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) answer="War" Z_x=max(x)+1 Z_y=min(y) if Z_x<=Z_y: for z in range(Z_x,Z_y+1): if X<z<=Y: answer="No War" break print(answer)
p02602
s780374069
Wrong Answer
N,K = map(int,input().split()) score_list = list(map(int,input().split())) M = N-K if M == 1: if score_list[K-1] < score_list[K]: print("Yes") else: print("No") else: for i in range(M): if sum(score_list[i:i+K]) < sum(score_list[i+1:i+K+1]): print("Yes") else: print("No")
p03043
s591591669
Wrong Answer
import math N,K = map(int, input().split()) p = 0 for i in range(1,N+1): if i >= K: p += (N-K-1)/N break else: p += 1/N * ((0.5)**math.ceil(math.log2(K/i))) # print((0.5)**math.ceil(math.log2(K/i))) print(p)
p03617
s768573806
Accepted
a, b, c, d = list(map(int, input().split())) n = int(input()) # 1リットル買う min_for_one = min(a*4, b*2, c) min_for_two = min(a*8, b*4, c*2, d) if n % 2 == 1: print((n //2)* min_for_two + min_for_one) else: print(n // 2 * min_for_two)
p03730
s377596940
Accepted
A, B, C = map(int, input().split()) print("YES" if any((A*i)%B==C for i in range(B)) else "NO")
p03557
s027307715
Wrong Answer
N=int(input()) *A,=sorted(map(int,input().split())) *B,=sorted(map(int,input().split())) *C,=sorted(map(int,input().split())) lenc=len(C) from bisect import * cnt=0 for b in set(B): in_a = bisect_left(A, b) in_c = bisect_right(C, b) cnt+= in_a*(lenc-in_c) print(cnt)
p03211
s654434203
Accepted
S=str(input()) L=list(S) x=len(L) l=list() for n in range(x-2): n=L[n:n+3] N=''.join(n) ans=abs(int(N)-753) l.append(ans) print(min(l))
p02793
s597371739
Accepted
def GCD(a, b): return GCD(b, a % b) if b else a def LCM(a, b): return a // GCD(a, b) * b n = int(input()) a = list(map(int, input().split())) al = 1 for i in range(n): al = LCM(al, a[i]) ans = 0 for i in range(n): ans += al // a[i] print(ans%1000000007)
p03821
s565485386
Accepted
N = int(input()) A = [None] * N B = [None] * N for i in range(N): A[i], B[i] = map(int, input().split()) result = 0 for i in range(N - 1, -1, -1): t = (A[i] + result) % B[i] if t != 0: result += B[i] - t print(result)
p03719
s489743932
Wrong Answer
a, b, c = map(int,input().split()) if c > a and c < b: print ("Yes") else: print ("No")
p03796
s613418992
Wrong Answer
#整数の入力 N = int(input()) ans = 1 for i in range(N): ans = ans * (i%(10**9 + 7)) print(ans)
p02556
s508358223
Accepted
N = int(input()) A = [] B = [] for i in range(N): x, y = map(int, input().split()) A.append(x+y) B.append(x-y) print(max(max(A)-min(A), max(B)-min(B)))
p03360
s525111023
Accepted
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**9) INF=10**18 MOD=10**9+7 input=lambda: sys.stdin.readline().rstrip() YesNo=lambda b: bool([print('Yes')] if b else print('No')) YESNO=lambda b: bool([print('YES')] if b else print('NO')) int1=lambda x:int(x)-1 def main(): A=list(map(int,input().split())) K=int(input()) A.sort() print(A[-1]*2**K+sum(A[:2])) if __name__ == '__main__': main()
p03239
s604435244
Wrong Answer
N,T=map(int,input().split()) a=1000 for i in range(N): c,t=map(int,input().split()) if t<=T: if c<a: a=c if a==1000: print("TLE") else: print(a)
p02682
s104345667
Accepted
A, B, C, K = [int(_) for _ in input().split()] l = A + B + C - K def solve(A, B, C, K): result = 0 n = min(A, K) result += n K -= n A -= n if K == 0: return result n = min(B, K) K -= n B -= n if K == 0: return result n = min(C, K) result -= n K -= n C -= n return result print(solve(A, B, C, K))
p03162
s848434860
Wrong Answer
import sys input = sys.stdin.readline n = int(input()) abc = [[int(x) for x in input().split()] for _ in range(n)] dp = [[0] * 3 for _ in range(n)] dp[0][0] = abc[0][0] dp[0][1] = abc[0][1] dp[0][1] = abc[0][2] for i in range(1, n): a, b, c = abc[i] dp[i][0] = max(dp[i - 1][1] + a, dp[i - 1][2] + a) dp[i][1] = max(dp[i - 1][0] + b, dp[i - 1][2] + b) dp[i][2] = max(dp[i - 1][0] + c, dp[i - 1][1] + c) print(max(dp[-1]))
p03495
s085310653
Accepted
N, K = map(int, input().split()) A = list(map(int,input().split())) B = [0]*N for i in range(N): B[A[i]-1]+=1 B.sort() print(sum(B[0:N-K]))
p03698
s811366502
Accepted
# https://atcoder.jp/contests/abc063/tasks/abc063_b s = input() t = set(s) if len(s) == len(t): print('yes') else: print('no')
p03449
s848604478
Accepted
def main(): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) for i in range(n-1): a[i+1] += a[i] for i in reversed(range(n-1)): b[i] += b[i+1] ans = 0 for i in range(n): ans = max(ans, a[i]+b[i]) print(ans) if __name__ == "__main__": main()
p02711
s883737384
Accepted
def main(): n = input() if n[0] == '7' or n[1] == '7' or n[2] == '7': print('Yes') else: print('No') main()
p03438
s178477434
Accepted
n=int(input()) a=[int(_) for _ in input().split()] b=[int(_) for _ in input().split()] m=sum(b)-sum(a) l=0 for i in range(n): if a[i]<b[i]: l+= (b[i]-a[i]+1)//2 if l>m: print("No") else: print("Yes")
p02546
s751027881
Wrong Answer
print(input()+'s')
p03329
s683470587
Accepted
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def f(n, a): ans = 0 while n > 0: ans += n % a n //= a return ans def main(): N = int(readline()) ans = INF for i in range(N + 1): ans = min(ans, f(i, 6) + f(N - i, 9)) print(ans) return if __name__ == '__main__': main()
p02909
s384489500
Accepted
import sys input = lambda: sys.stdin.readline().rstrip() def main(): s = input() weather = ['Sunny', 'Cloudy', 'Rainy', 'Sunny'] print(weather[weather.index(s)+1]) if __name__ == '__main__': main()
p03485
s095315858
Wrong Answer
a,b=map(int,input().split()) print(-(-(a+b)/2))
p03037
s045618078
Wrong Answer
from itertools import accumulate N, M = map(int, input().split()) left = 1 right = M for i in range(M): a,b = map(int, input().split()) left = max(left,a) right = min(right, b) print(max(0,right-left+1)) # imos = [0] * (N + 2) # for i in range(M): # l, r = map(int, input().split()) # imos[l] += 1 # imos[r + 1] -= 1 # # imos = list(accumulate(imos)) # # ans = 0 # for im in imos: # ans += (im == M) # # print(ans)
p02552
s434198471
Accepted
N = int(input()) if N == 1: print(0) else: print(1)
p03951
s960386962
Accepted
n = int(input()) s = input() t = input() ans = "" for i in range(n): if s[i] == t[0] and s[i:] == t[:n-i]: ans = s[:i]+t break print(n*2 if ans=="" else len(ans))
p03109
s092658434
Accepted
S = input() if int(S[:4]) == 2019: if int(S[5:7]) == 4: if int(S[8:-1]) == 30: print('Heisei') elif int(S[8:-1]) >= 31: print('TBD') else: print('Heisei') elif int(S[5:7]) >= 5: print('TBD') else: print('Heisei') elif int(S[:4]) >= 2020: print('TBD') else: print('Heisei')
p03723
s045303917
Accepted
a,b,c=map(int,input().split()) if a==b==c and a%2==0 and b%2==0 and c%2==0: print(-1) else: ans=0 while a%2==0 and b%2==0 and c%2==0: A=a B=b C=c a=B//2+C//2 b=A//2+C//2 c=B//2+A//2 ans+=1 if a==b==c: ans=-1 break print(ans)
p02972
s352571693
Accepted
def divs(num): ans = [] for i in range(1,int(num**(1/2)+1)): if num%i == 0: ans += [i,num//i] return set(ans) n = int(input()) a = list(map(int,input().split())) fin = [] ans = [0]*(n+1) for i in range(n,0,-1): # print(i,a[i-1],ans[i]) if a[i-1]^ans[i]: fin += [i] div = divs(i) # print(div) for j in div: ans[j] ^= 1 print(len(fin)) print(*fin)
p03013
s964484193
Wrong Answer
N,M = map(int,input().split()) a = [int(input()) for _ in range(M)] MOD = 1000000007 d = [0] * (N+1) d[0] = 1 d[1] = 1 for i in range(2,N+1): if(i in a): d[i] = 0 else: d[i] = d[i-1] + d[i-2] print(d[-1] % MOD)
p02554
s733575732
Wrong Answer
n=int(input()) mod=10**9+7 print(pow(10,n,mod)-pow(9,n,mod)-pow(9,n,mod)+pow(8,n,mod))
p03862
s422829680
Accepted
N, X = map(int, input().split(' ')) A = list(map(int, input().split(' '))) cost = max(0, A[0] + A[1] - X) A[1] = max(0, A[1] - cost) for i in range(2, N): cost += max(0, A[i - 1] + A[i] - X) A[i] = max(0, A[i] - max(0, A[i - 1] + A[i] - X)) print(cost)
p03386
s982270004
Accepted
A, B, K = map(int, input().split()) for x in range(A, A+K): if x<=B: print(x) for x in range(max(x+1, B-K+1), B+1): if x>=A: print(x)
p02916
s551531286
Wrong Answer
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) ans=0 for i in range(len(C)): ans = ans+B[A[i]-1] if i>0: if A[i]==A[i-1]+1: ans = ans+C[A[i-1]-1] print(ans)
p02779
s704990176
Accepted
N = input() A = list(map(int, input().split())) set_A = set(A) if len(A)==len(set_A): print('YES') else: print('NO')
p04011
s738268178
Accepted
N = int(input()) K = int(input()) X = int(input()) Y = int(input()) if N <= K: print(N * X) else: print(K * X + (N - K) * Y)
p02712
s660305537
Accepted
N = int(input()) ans = 0 for i in range(N+1): if i % 3 == 0: continue if i % 5 == 0: continue ans += i print(ans)
p03627
s438039977
Accepted
n=int(input()) A=list(map(int,input().split())) A.sort() A.reverse() h=int(0) w=int(0) i=int(1) while i<n: if A[i]==A[i-1] and h==0: h=A[i] i+=1 elif A[i]==A[i-1] and w==0: w=A[i] i+=1 i+=1 print(h*w)
p03778
s839846526
Wrong Answer
w,a,b=map(int,input().split()) print(max(0,b-a-w))
p03797
s503069673
Accepted
N,M = map(int, input().split()) if M >= 2*N: ans = N M -= 2*N ans += M//4 else: ans = M//2 print(ans)
p03627
s888729216
Accepted
n, *a = map(int, open(0).read().split()) a.sort(reverse=True) width = 0 length = 0 flg = False cnt = 0 for i in range(n - 1): if flg: flg = False continue if a[i] == a[i + 1]: if cnt == 0: width = a[i] elif cnt == 1: length = a[i] break flg = True cnt += 1 print(width * length)
p03407
s572339208
Wrong Answer
a,b,c=input().split() a=int(a) b=int(b) c=int(c) if a+b<=c: print("Yes") else: print("No")
p03624
s167935377
Wrong Answer
#071 b-not found #A~ 65 65+26 a~97 97+26 s=input() a=[chr(i) for i in range(97,97+26)] for i in range(26): if a[i] not in s: ans=i break print(chr(97+i))
p02786
s809799075
Wrong Answer
H = int(input()) count = 0 while H > 1: if H%2 == 0: H = H/2 else: (H+1)/2 count += 1 print(2**(count-1)+2**count)
p03943
s029870912
Accepted
x,y,z=map(int,input().split()) if x+y==z or y+z==x or z+x==y: print('Yes') else: print('No')
p02608
s630524053
Wrong Answer
import math N=int(input()) count=[0]*(N+1) for i in range(N): for x in range(1,int(math.sqrt(N+1)/3)): for y in range(1,int(math.sqrt(N+1)/3)): for z in range(1,int(math.sqrt(N+1)/3)): if(x**2+y**2+z**2+x*y+y*z+z*x==i): count[i]+=1 for j in range(1,N+1): print(count[j])
p03759
s836000821
Accepted
a,b,c=map(int,input().split()) if b-a == c-b: print('YES') else: print('NO')
p02618
s991483249
Accepted
d =int(input()) for i in range(d): print(17)
p03251
s631877042
Accepted
n, m, x, y = map(int, input().split()) lx = list(map(int, input().split())) ly = list(map(int, input().split())) lx.append(x) ly.append(y) lx.sort() ly.sort() if lx[-1] < ly[0]: print('No War') else: print('War')
p04034
s007876264
Wrong Answer
n, m = map(int, input().split()) XY = list(map(int, input().split()) for _ in range(m)) Ball = [0] * n Done = [False] * n Ball[0] = 1 Done[0] = True for i in range(m): x, y = XY[i] x -= 1 y -= 1 if Ball[x] >= 1: if Done[y] == False: Ball[x] -= 1 Ball[y] = 2 Done[y] = True else: Ball[x] -= 1 Ball[y] += 1 res = 0 for i in range(n): if Ball[i] != 0: res += 1 print(res)
p04033
s830990860
Wrong Answer
a,b = map(int, input().split()) if a>0 and b>0: print("Positive") elif a<=0 and b>=0: print("Zero") elif a<0 and b<0: print("Negative")
p03821
s178485955
Accepted
n=int(input()) a,b=[],[] for _ in range(n): A,B=map(int,input().split()) a.append(A) b.append(B) ans,temp=0,0 for i in range(n-1,0,-1): if a[i]%b[i]!=0: temp2=b[i]+b[i]*(a[i]//b[i])-a[i] else: temp2=0 temp+=temp2 ans+=temp2 a[i-1]+=temp if a[0]%b[0]!=0: ans+=b[0]+b[0]*(a[0]//b[0])-a[0] print(ans)
p03745
s879771617
Accepted
n = int(input()) A = list(map(int, input().split())) r = 1 if n>2: d = A[1]-A[0] for i in range(2, n): if d: if (A[i]-A[i-1])*d<0: r += 1 d = 0 else: d = A[i]-A[i-1] print(r)
p02552
s233599272
Wrong Answer
if __name__ == "__main__": a = input() a = int(a) if a==0: print(0) if a==1: print(1)
p03379
s889541244
Accepted
def main(): N, *X = map(int, open(0).read().split()) l, r = sorted(X)[N // 2 - 1:N // 2 + 1] print("\n".join(map(str, [r if x < r else l for x in X]))) return main()
p02899
s419684952
Accepted
N = int(input()) A = list(map(int, input().split())) for i in range(N): A[i] = (A[i], i+1) A.sort() print(' '.join([str(a[1]) for a in A]))
p02658
s061515997
Wrong Answer
n = int(input()) a = list(map(int, input().split())) prod = 1 if 0 in a: print(0) exit() for i in a: prod *= i if prod >= 10**18: print(-1) exit() print(prod)
p03556
s489627606
Wrong Answer
n = int(input()) ans = [] for i in range(1, n): if i * i <= n: ans.append(i*i) elif i * i > n: print(max(ans)) exit()
p02909
s404500896
Accepted
S = input() if S == 'Sunny': print('Cloudy') elif S == 'Cloudy': print('Rainy') elif S == 'Rainy': print('Sunny')
p04005
s939096496
Accepted
A,B,C=map(int,input().split()) ans=A*B*C ans=min(ans,abs(A*B*C-2*(A//2)*B*C)) ans=min(ans,abs(A*B*C-2*(B//2)*A*C)) ans=min(ans,abs(A*B*C-2*(C//2)*B*A)) print(ans)
p04045
s972999559
Accepted
n,k = map(int,input().split()) d=set(input().split()) while True: if len(set(str(n))&d)!=0: n+=1 else: break print(n)
p03493
s705307996
Accepted
a=input() x=0 for i in range(3): if a[i]=="1": x=x+1 print(x)
p03745
s205367341
Accepted
from collections import deque n=int(input()) a=list(map(int,input().split())) d=deque(a) tmp=[d[0]] d.popleft() ans=1 while d: t=tmp[-1]-tmp[0] if len(tmp)==1 or t==0: tmp.append(d.popleft()) elif t>0 and d[0]>=tmp[-1]: tmp.append(d.popleft()) elif t<0 and d[0]<=tmp[-1]: tmp.append(d.popleft()) else: ans+=1 tmp=[d.popleft()] print(ans)
p03633
s557193668
Accepted
from fractions import gcd from functools import reduce from collections import deque # from math import factorial import sys sys.setrecursionlimit(2000000) # import math # import itertools # import statistics # import numpy as np # import collections n = int(input()) # = list(map(int, input().split())) t = [] for i in range(n): t.append(int(input())) def lcm_base(x, y): return (x * y) // gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) print(lcm_list(t))
p02933
s077978747
Accepted
a=int(input()) s=input() if a >=3200: print(s) else: print("red")
p03434
s380623884
Wrong Answer
card_n = int(input()) card_collection = list(map(int, input().split())) scores = {"alice" : 0, "bob" :0} card_collection.sort() for i, card in enumerate(card_collection): if i % 2 == 0: scores['bob'] += card else: scores['alice'] += card print(scores['alice'] - scores['bob'])
p02630
s957252056
Wrong Answer
from sys import stdin input=stdin.readline input() a=list(map(int,input().split())) ans=sum(a) b=[0]*(max(a)+1) y=max(a)+1 for i in a: b[i]+=1 c=int(input()) for i in range(c): n,m=map(int,input().split()) if n<y and m<y: x=b[n] if x>0: b[m]+=x b[n]=0 ans+=(m-n)*x print(ans)
p03723
s100938095
Wrong Answer
A,B,C = map(int,input().split()) cou = 0 if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1): print("0") while(cou < 10*7): cou += 1 A = B/2 + C/2 B = A/2 + C/2 C = A/2 + B/2 if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1): print(str(cou)) break else: pass print("-1")
p02793
s533565385
Accepted
def gcd(a,b): if b==0: return a return gcd(b,a%b) def lcm(arr): ans = 1 for i in arr: ans = (ans*i)//gcd(ans,i) return ans n = int(input()) arr = list(map(int,input().split())) #list(map(int, input().split())) l = lcm(arr) ans = 0; for i in arr: ans+= l//i print(ans%(10**9+7))
p03059
s100297495
Accepted
a,b,t=map(int,input().split()) print((t//a)*b)
p03262
s136881111
Wrong Answer
import fractions from functools import reduce n, X = map(int, input().split()) x = [int(i) - X for i in input().split()] print(reduce(fractions.gcd, x))
p03795
s044554034
Wrong Answer
n=int(input());print((n*4+n//15)*200)
p03208
s026445629
Wrong Answer
n, k = map(int, input().split()) h = [int(input()) for _ in range(n)] h.sort() ans = 10**9 for i in range(0, n-2): x = [h[i], h[i+1], h[i+2]] if (max(x) - min(x) < ans): ans = max(x) - min(x) print(ans)
p03852
s194278506
Wrong Answer
n = input() if 'n' in 'aiueo': print('vowel') else: print('consonant')
p03639
s098666288
Accepted
N=int(input()) A=list(map(int,input().split())) count_4=0 count_2=0 count_1=0 for i in A: if i%4==0: count_4+=1 elif i%2==0: count_2+=1 else: count_1+=1 if count_2<2: if count_1+count_2-1<=count_4: print("Yes") else: print("No") else: if count_1<=count_4: print("Yes") else: print("No")
p03150
s884842666
Accepted
s = input() for i in range(8): b = i e = i+len(s)-7 if s[:i]+s[e:]=='keyence': print('YES') break else: print('NO')
p02727
s629923461
Wrong Answer
from collections import deque x, y, a, b, c = map(int, input().split()) #2つ以上の整数 a_temp = list(map(int, input().split())) b_temp = list(map(int, input().split())) c_temp = list(map(int, input().split())) a_temp.sort() b_temp.sort() c_temp.sort() a_list = deque(a_temp) b_list = deque(b_temp) c_list = deque(c_temp) ans = 0 for _ in range(x): ans += a_list.pop() for _ in range(y): if b_list[-1] > c_list[-1]: ans += b_list.pop() else: ans += c_list.pop() print(ans)
p03371
s176401907
Wrong Answer
a,b,c,x,y = map(int, input().split()) if c<a/2 and c<b/2: print(c*max(x,y)*2) elif (a+b)/2 < c: print(a*x + b*y) else: if x<y: print(c*2*x + b*(y-x)) else: print(c*2*y + a*(x-y))
p02696
s492622883
Accepted
A,B,N = [int(i) for i in input().split()] t = min([N,B-1]) print((A*t//B))