problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p03220
s696885749
Accepted
n=int(input()) t,a=list(map(float,input().split())) h=list(map(int,input().split())) tmp=float(1e9+7) ans=0 for i in range(n): if abs(a-(t-h[i]*0.006))<tmp: tmp=abs(a-(t-h[i]*0.006)) ans=i+1 print(ans)
p03161
s126817350
Accepted
n,k = map(int,input().split()) h = list(map(int,input().split())) dp = [100000000000 for _ in range(n)] dp[0] = 0 for i in range(n): for j in range(min(i,k)+1): dp[i] = min(dp[i-j]+abs(h[i]-h[i-j]),dp[i]) print(dp[-1])
p02706
s502859650
Accepted
n, m = map(int, input().split()) *arr, = map(int, input().split()) print(max(n - sum(arr), -1))
p02693
s937773600
Wrong Answer
k = int(input()) a,b = map(int,input().split()) if k <= b-a+1 or (a<=k and k<=b) or (b % k >= b-a+1): print('OK') else: print('NG')
p02958
s803454139
Accepted
n = int(input()) p = list(map(int, input().split())) t = [i for i in range(1,n+1)] l = [i for i in range(n) if p[i] != t[i]] if len(l) == 0 or len(l) == 2: print('YES') else: print('NO')
p03261
s454646868
Accepted
#b N=int(input()) W=[None]*N for i in range(N): W[i] = input() if all( W[i][0]==W[i-1][-1] for i in range(1,N) ) and len(set(W))==N: print("Yes") else: print("No")
p03474
s826021665
Wrong Answer
import copy a,b = map(int, input().split()) s = list(input()) tmp = copy.copy(s) tmp.pop(a) if 1 <= a and b <= 5 and a + b + 1 == len(s) and s[a] == '-' and 'tmp'.join(tmp).isnumeric(): print('yes') else: print('No')
p03359
s861531150
Wrong Answer
import sys input = sys.stdin.readline a,b=map(int,input().split()) cnt=1 for i in range(1,a): for j in range(1,b): if i==j: cnt+=1 print(cnt)
p03485
s988396607
Accepted
a = list(map(int, input().split())) sum = a[0] + a[1] if sum%2 == 0: print(int(sum/2)) else: print(int((sum + 1)/2))
p03437
s830065212
Accepted
X, Y = map(int, input().split()) if X % Y == 0: print(-1) else: print(X)
p02631
s347253728
Accepted
n=int(input()) a=list(map(int,input().split())) x=a[0] for i in range(1,n): x=x^a[i] ans=[] for i in range(n): ans.append(str(x^a[i])) print(' '.join(ans))
p02818
s864732934
Accepted
a, b, k = map(int, input().split()) if a >= k: print(a-k, b) elif b >= k-a: print(0, b - (k-a)) else: print(0, 0)
p03017
s937484457
Wrong Answer
n, a, b, c, d = map(int, input().split()) S = input() if c < d and (S[a-1:d+1].count("##") == 0): print("Yes") exit() if c > d and (S[b-1:d+1].count("...") >= 1) and (S[a-1:d+1].count("##") == 0): print("Yes") exit() print("No")
p03665
s780356702
Accepted
import math from scipy.special import comb n, p = map(int, input().split()) aa = list(map(int, input().split())) odd = [] even = [] for i in range(n): if aa[i] % 2 == 0: even.append(aa[i]) else: odd.append(aa[i]) x = len(odd) y = len(even) sum1 = 0 for i in range(0, x+1, 2): sum1 += comb(x,i) sum2 = 0 for i in range(1, x+1, 2): sum2 += comb(x,i) if p == 0: ans = int((2 ** y) * sum1) else: ans = int((2 ** y) * sum2) print(ans)
p02835
s636010963
Wrong Answer
def main(): a = list(map(int, input().split())) print(sum(a)) if __name__ == '__main__': main()
p03380
s856200858
Wrong Answer
import sys def main(): input = sys.stdin.readline n=int(input()) *A,=map(int, input().split()) #mCr m,r=max(A),0 maxd=0 for a in A: if a>=m: continue d = min(a,m+1-a) if maxd<d: maxd=d r=a print(m,r) if __name__ == '__main__': main()
p03210
s022730123
Wrong Answer
print('Yes' if int(input()) in [7, 5, 3] else 'No')
p02676
s120007945
Accepted
K=int(input()) S=input() print(S[:K]+"..." if len(S)>K else S)
p02702
s789092858
Accepted
import collections s = input() l = [int(s[-1])] d = 10 for i in range(len(s)-2, -1, -1): l.append((l[-1] + int(s[i])*d) % 2019) d *= 10 d %= 2019 c = collections.Counter(l) ans = 0 for i in c.values(): ans += i*(i-1)//2 ans += c[0] print(ans)
p02742
s582163844
Accepted
h, w = map(int, input().split()) if h==1 or w==1: print(1) elif h%2==0 or w%2==0: print(int(h*w/2)) else: print(int((h*w+1)/2))
p02935
s440341694
Accepted
N = int(input()) v = list(map(int,input().split())) v.sort() tmp = v[0] for i in range(1,N): tmp = (tmp+v[i])/2 print(tmp)
p02690
s817840688
Wrong Answer
s = set() table= {} for i in range(100): s.add(i**5) table[i**5] = i x = int(input()) for i in range(100): b5 = i**5 if x-b5 in s: print(table[x-b5],-i) if x+b5 in s: print(table[x+b5],i)
p03835
s854587974
Accepted
k, s = map(int, input().split()) ans = 0 for i in range(k+1): for j in range(k+1): if 0 <= s-i-j <= k: ans += 1 print(ans)
p03493
s357360753
Wrong Answer
A = input() s = 0 for i in range(0,2): if A[i] ==1: s = s + 1 print(s)
p02640
s714239115
Accepted
x, y = map(int, input().split()) all_crane_num = x * 2 diff = y - all_crane_num turtle_num = int(diff / 2) crane_num = x - turtle_num if turtle_num >= 0 and crane_num >= 0 and turtle_num*4 + crane_num*2 == y: print('Yes') else: print('No')
p02817
s226768144
Wrong Answer
a,b=map(str,input().split()) if len(a)>len(b): print(b+a) else: print(a+b)
p03951
s409971444
Accepted
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N, S, T = read().split() N = int(N) def test(n): overlap = N + N - n if overlap <= 0: return True return S[-overlap:] == T[:overlap] for n in range(N, N + N + 10): if test(n): break print(n)
p02691
s751811638
Accepted
N=int(input()) A = [int(i) for i in input().split()] left = [0] * N right = [0] * N for i,a in enumerate(A): if 0 <= i-a: left[i - a] += 1 if i + a < N: right[i + a] += 1 ans = 0 for i in range(N): ans += left[i] * right[i] print(ans)
p02747
s795105346
Accepted
s=input() n=len(s) p=0 if n%2==1: p=1 else: n2=n//2 for i in range(n2): if s[i*2]!='h': p=1 if s[i*2+1]!='i': p=1 if p==0: print('Yes') else: print('No')
p02583
s158723170
Wrong Answer
n = int(input()) l = [0 for x in range(n)] l = list(map(int,input().split())) l.sort() cnt = 0 a = 0 b = 0 c = 0 if n < 3: print(0) else: for i in range(n-2): a = l[i] for j in range(i+1,n-1): b = l[j] for k in range(j+1,n): c = l[k] if a+b > c and a != b and b != c: cnt += 1 print(cnt)
p03617
s963528785
Accepted
Q,H,S,D = map(int, input().split()) N = int(input()) ans = 0 if N >= 2: ans += N//2 * min(Q*8, H*4, S*2, D) N %= 2 if N == 1: ans += min(Q*4, H*2, S) print(ans)
p02854
s859041140
Accepted
N=int(input()) *A,=map(int,input().split()) S=sum(A) count1=0 count2=[0]*N i=0 while i<N: count1+=A[i] count2[i]=abs(S-2*count1) i+=1 print(min(count2))
p04019
s239499407
Wrong Answer
a = input() v = 0 h = 0 if a.count('W') >=1: if a.count('E') ==0: print('NO') exit() elif a.count('E') >=1: if a.count('W') ==0: print('NO') exit() elif a.count('N')>= 1: if a.count('S') ==0: print('NO') exit() elif a.count('S')>= 1: if a.count('N')==0: print('NO') exit() print('YES')
p02958
s875536720
Accepted
#!/usr/bin/env python3 # input = stdin.readline def main(): N = int(input()) p = list(map(int,input().split())) def solve(n,p): assert n >= 2 target = sum(0 if p[i]==i+1 else 1 for i in range(n)) return target == 0 or target == 2 print("YES" if solve(N,p) else "NO") return if __name__ == '__main__': main()
p02729
s470083755
Accepted
n, m = map(int, input().split()) if n*m == 1: print(0) else: print(int(n*(n-1)/2+m*(m-1)/2))
p03319
s066013566
Wrong Answer
n,k=map(int,input().split()) a=list(map(int,input().split())) import numpy as np a=np.array(a) temp=np.argmin(a) import math if n==k: print(1) else: print(math.ceil(temp/(k-1))+math.ceil((n-temp-1-(temp+1)%(k-1))/(k-1)))
p02723
s041504819
Accepted
S = input() if S[2]==S[3] and S[4]==S[5]: print('Yes') else: print('No')
p02583
s955462203
Wrong Answer
import itertools Length = int(input()) inputList = input() seq = [int(x) for x in inputList.split(' ')] a = list(itertools.combinations(seq, 3)) def b(line): list = [] for i in range(len(line)): if line[i][0] + line[i][1] > line[i][2] and line[i][1] + line[i][2] > line[i][0] and line[i][2] + line[i][0] > line[i][1]: list.append(line[i]) continue else: continue return list print(b(a))
p04029
s170407002
Wrong Answer
N = int(input()) print(N*(N-1)//2)
p02831
s772829977
Wrong Answer
a,b=map(int,input().split()) ans=a*b for i in range(2,max(a,b)): if a%i==0 and b%i==0: ans=ans/i print(int(ans))
p03041
s653143364
Wrong Answer
n, k = map(int, input().split()) s = input() target = s[k - 1] lower = chr(ord(target) + 32) # target.lower() result = s.replace(target, lower) print(result)
p03494
s610236438
Accepted
n = int(input()) a = list(map(int, input().split())) res = float('inf') for v in a: cnt = 0 while v % 2 == 0: v //= 2 cnt += 1 res = min(res, cnt) print(res)
p03487
s044724282
Accepted
N=int(input()) A=list(map(int,input().split())) m={} for i in range(N): if A[i] in m: m[A[i]] += 1 else: m[A[i]] = 1 ans = 0 for k,n in m.items(): if k <= n: ans += n-k else: ans += n print(ans)
p02842
s482473603
Wrong Answer
n = int(input()) for i in range(n + 1) : if int(i * 1.08) == n: print(i) break print(":(")
p03557
s303907899
Wrong Answer
n = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] c = [int(i) for i in input().split()] #a.sort() #b.sort(reverse=True) #c.sort() ans = 0 A = [] bs = [] for i in range(n): A.append(sum(x>a[i] for x in b)) for i in range(n): bs.append(sum(x>b[i] for x in c)) bs.sort(reverse=True) ans = 0 for i in range(n): if A[i] > 1: ans += sum(bs[:A[i]-1]) print(ans)
p02578
s500817892
Accepted
n = int(input()) L = list(map(int,input().split())) maxh = L[0] sum1 = 0 for i in range(1,n): if L[i] > maxh: maxh = L[i] else: sum1 += maxh-L[i] print(sum1)
p03075
s474131604
Accepted
p = [] for i in range(5): p.append(int(input())) k = int(input()) for i in range(5): for j in range(i+1,5): if p[j] - p[i] >k: print(":(") exit() print("Yay!")
p03261
s508991640
Accepted
n = int(input()) W = [input() for i in range(n)] word = W[0] words = [word] for i in range(1,n): if W[i] in words or word[-1] != W[i][0]: print("No") break word = W[i] words.append(word) else: print("Yes")
p02724
s432642558
Accepted
def main(): x = int(input()) h = (x//500)*1000 res = x % 500 h += (res//5)*5 print(h) if __name__ == "__main__": main()
p03331
s584529607
Accepted
n = int(input()) ans = 10**10 for i in range(1,n): j = n-i l1 = len(str(i)) l2 = len(str(j)) l1_cnt,l2_cnt = 0,0 for k in range(l1): l1_cnt +=int(str(i)[k]) for l in range(l2): l2_cnt +=int(str(j)[l]) ans = min(ans,l1_cnt+l2_cnt) print(ans)
p04043
s893170385
Wrong Answer
a =list(map(int,input().split())) if sum(a) == 19 and a.count("7") == 2: print("YES") else: print("NO")
p04034
s019744601
Accepted
n,m=map(int,input().split()) cnt=[1]*n res=[0]*n res[0]=1 for i in range(m): x,y=map(int,input().split()) if res[x-1]==1: res[y-1]=1 if cnt[x-1]==1: res[x-1]=0 cnt[x-1]-=1 cnt[y-1]+=1 print(sum(res))
p03162
s946117853
Accepted
N = int(input()) last_a = 0 last_b = 0 last_c = 0 for _ in range(N): a, b, c = map(int, input().split()) last_a, last_b, last_c = a + max(last_b, last_c), b + max(last_c, last_a), c + max(last_a, last_b) print(max(last_a, last_b, last_c))
p03486
s885872503
Accepted
s = ''.join(sorted(input())) t = ''.join(reversed(sorted(input()))) print('Yes' if s < t else 'No')
p02933
s071181095
Wrong Answer
a = int(input()) s = str(input()) if a >= 3200: print('s') else: print('red')
p02622
s078780507
Accepted
a = list(input()) b = list(input()) counter = 0 for i in range(len(a)): if a[i] != b[i]: counter += 1 print(counter)
p03208
s679933702
Wrong Answer
n,k=map(int,input().split()) a=[int(input()) for i in range(n)] a.sort() x=10**9 for i in range(n-k+1): x=min(x,a[i+k-1]-a[k]) print(x)
p02933
s626513266
Accepted
a = int(input()) s = input() if 3200 <= a: print(s) if a < 3200: print("red")
p03211
s914625459
Wrong Answer
s=input() ans=1000 for i in range(len(s)-2): a=abs(int(s[i:i+3])-753) if ans>a: ans=a print(a)
p03038
s254542287
Accepted
n,m=map(int,input().split()) a=list(map(int,input().split())) a.sort() bc=[list(map(int,input().split())) for i in range(m)] bc.sort(key=lambda x:x[1], reverse=True) flg=0 cnt=0 for i in range(n): if bc[flg][1] > a[i]: a[i] = bc[flg][1] cnt+=1 if cnt==bc[flg][0]: flg+=1 cnt=0 else: flg+=1 cnt=0 if flg == m: break print(sum(a))
p03038
s888349090
Wrong Answer
import heapq N, M = list(map(int,input().split())) A = list(map(int,input().split())) B = [list(map(int,input().split())) for i in range(M)] B = sorted(B, key = lambda x: x[1]) for i in range(N): A[i] *= -1 heapq.heapify(A) cnt = 0 for i in range(M): for _ in range(B[i][0]): heapq.heappush(A, -max(-heapq.heappop(A), B[i][1])) cnt += B[i][0] if cnt >= N: break print(-sum(A))
p03146
s934385243
Wrong Answer
s = int(input()) a = [0]*1000000 a[0] = s i = 1 d = {} while True: if a[i-1] % 2 == 0: a[i] = a[i-1] // 2 else: a[i] = 3 * a[i-1] + 1 if d.get(a[i]) is None: d[a[i]] = 1 else: print(i+1) exit() i += 1
p03623
s923637478
Accepted
x,a,b=map(int,input().split()) if abs(x-a)>abs(x-b): print("B") else: print("A")
p02718
s301272174
Wrong Answer
N, M = map(int, input().split()) A = list(map(int, input().split())) A.sort(reverse = True) if sum(A)/(4*M) < A[M -1]: print("Yes") else: print("No")
p03565
s691165015
Wrong Answer
s = list(input()) t = list(input()) n = len(s) m = len(t) flag = 0 flag_2 = 0 for i in range(n): if s[i] == "?" or s[i] == t[flag]: if flag == m-1: flag_2 = 1 for j in range(flag,-1,-1): s[i-(m-1-j)] = t[j] else: flag += 1 else: flag = 0 if flag_2 == 1: for i in range(n): if s[i] == "?": s[i] = "a" print("".join(s)) else: print("UNRESTORABLE")
p03555
s406629514
Wrong Answer
# 077a def atc_077a(input_value: str) -> str: C1 = input_value[0] C2 = input_value[1] if C1[0] == C2[2] and C1[1] == C2[1]: return "YES" else: return "NO" C1 = input() C2 = input() print(atc_077a([C1,C2]))
p02723
s408326422
Accepted
S = input() if S[2] == S[3] and S[4] == S[5]: print('Yes') else: print('No')
p03352
s566515916
Accepted
from math import sqrt x = int(input()) cnt = 0 l = [] for i in range(1, x + 1): for j in range(1, int(sqrt(i)) +1): for k in range(2, 10): if j ** k == i: l.append(i) print(max(l))
p02720
s625628222
Wrong Answer
from collections import deque K = int(input()) a = deque(range(1,10)) # a = deque() pop_count = 0 while pop_count + len(a) < K: pop = a.popleft() pop_count +=1 first_digit = pop % 10 pull = pop * 10 + first_digit if first_digit != 9: a.extend([pull-1, pull, pull+1]) else: a.extend([pull-1, pull]) print(a[K-pop_count-1])
p03331
s605710792
Accepted
n=int(input()) ans=10**6 for i in range(1,n+1): a=i b=n-i if a<=b: asum=sum(map(int,str(a))) bsum=sum(map(int,str(b))) if ans>(asum+bsum): ans=asum+bsum print(ans)
p02989
s874935193
Wrong Answer
import bisect n = int(input()) li = list(map(int,input().split())) li.sort() #print(li) count = 0 for i in range(1, max(li)): index = bisect.bisect_left(li, i) #print(n,index,n//2) if index == (n+1)//2: #print(index) count += 1 print(count)
p02935
s048265760
Accepted
n = int(input()) a = list(map(int,input().split())) a.sort() sum = a[0] for i in range(1,n): sum = (sum + a[i])/2 print(sum)
p02829
s153267023
Wrong Answer
n=input() m=int(n) e2=0 e5=0 while m>1: if m%5!=0 and m%2!=0: continue m2=m m5=m while m2%2==0: e2=e2+1 m2=m2/2 while m5%5==0: e5=e5+1 m5=m5/5 m=m-2 print(min(e2,e5))
p03145
s987353747
Accepted
a, b, c = map(int, input().split()) S = (1/2)*a*b*c/max(a,b,c) print(int(S))
p02811
s369624484
Wrong Answer
k,x = input().split() if k*500 >= x: print("Yes") else: print("No")
p04020
s118579025
Accepted
n = int(input()) a = [int(input()) for _ in range(n)] ans = 0 i = 0 while i < n: res = 0 for j in range(i, n): if a[j] == 0: break res += a[j] ans += res // 2 i = j + 1 print(ans)
p03360
s790254856
Accepted
l=list(map(int,input().split())) l.sort() k=int(input()) print(l[0]+l[1]+l[2]*2**k)
p02600
s267353526
Wrong Answer
x=int(input()) for i in range(8): if(400+i*200)<=x: y=8-i print(y,'級')
p03011
s773599422
Wrong Answer
P, Q, R = map(int, input().split()) print(max(P+Q, Q+R, R+P))
p03698
s497811717
Accepted
s = input() n = len(s) for i in range(n): for j in range(n): if i!=j and s[i]==s[j]: print("no") exit() print("yes")
p03785
s659292768
Accepted
n, c, k = map(int, input().split()) t = sorted([int(input()) for _ in range(n)]) ans = 1 passenger = 0 limit = t[0] + k for p in t: if passenger < c and p <= limit: passenger += 1 else: ans += 1 passenger = 1 limit = p + k print(ans)
p03282
s646107289
Accepted
S = input() K = int(input()) # 5 * 10^15 cnt = 0 for i in range(len(S)): if int(S[i]) == 1: cnt += 1 else: if cnt >= K: print(1) else: print(int(S[i])) exit() print(1)
p02600
s943665282
Accepted
X = int(input()) if 400 <= X and X <= 599: print(8) elif 600 and X <= 799: print(7) elif 800 <= X and X <= 999: print(6) elif 1000 <= X and X <= 1199: print(5) elif 1200 <= X and X <= 1399: print(4) elif 1400 <= X and X <= 1599: print(3) elif 1600 <= X and X <= 1799: print(2) else: print(1)
p02789
s743190207
Accepted
n,m=map(int,input().split()) if n==m: print('Yes') else : print('No')
p02659
s798289083
Wrong Answer
a,b=open(0).read().split() a=int(a) b=int(float(b)*100) print(a*b//100)
p04019
s876774453
Accepted
S = input() set_ = set() for i in S: set_.add(i) if len(set_) == 4: print("Yes") elif len(set_) == 2: if 'N' in set_ and 'S' in set_: print("Yes") elif 'E' in set_ and 'W' in set_: print("Yes") else: print("No") else: print("No")
p02583
s817934250
Wrong Answer
import numpy as np bars = list(map(int, input().split(" "))) length = len(bars) def check_triangle(a, b, c): if a == b or b == c or c == a: return 0 if ((a + b) > c) and ((b + c) > a) and ((c + a) > b): return 1 else: return 0 count = 0 for i, li in enumerate(bars): for k in range(i+1, length): res = np.sum([check_triangle(bars[i], bars[k], bars[j]) for j in range(k+1, length)]) count += int(res) print(count)
p02690
s635698770
Accepted
X=int(input()) for a in range(-118,120): for b in range(-118,a+1): if a**5-b**5==X: print("%s %s" % (a,b)) exit()
p03852
s852720515
Accepted
c = input() if c == 'a'or c =='i'or c =='u' or c == 'e'or c == 'o': print('vowel') else: print('consonant')
p03817
s206204345
Accepted
x=int(input()) cnt=(x//11)*2 res=x%11 if res==0: cnt=cnt elif res<=6: cnt=cnt+1 else: cnt=cnt+2 print(cnt)
p02842
s808077644
Accepted
import math p = int(input()) d = math.floor(p / 1.08) if(math.floor(d * 1.08) == p): print(d) elif(math.floor((d+1) * 1.08) == p): print(d+1) else: print(":(")
p02695
s934512160
Wrong Answer
from itertools import product def main(): n, m, q = map(int, input().split()) abcd = [list(map(int, input().split())) for _ in range(q)] mm = [_ for _ in range(1, m+1)] m_list = product(mm, repeat=n) ans = 0 for l in m_list: tmp = 0 for data in abcd: if l[data[1]-1] - l[data[0]-1] == data[2]: tmp += data[3] if tmp > ans: ans = tmp print(ans) if __name__ == "__main__": main()
p03131
s221906053
Accepted
def main(): k, a, b = map(int, input().split()) cookie = 1 if b <= a + 1 or 1 + k <= a: cookie += k else: cookie += a - 1 k -= a - 1 if k % 2: k -= 1 cookie += 1 cookie += (b - a) * max(0, k // 2) print(cookie) if __name__ == '__main__': main()
p02695
s243102872
Accepted
import itertools N, M, Q = map(int, input().split()) dic = {} for i in range(Q): a, b, c, d = map(int, input().split()) dic[(a-1, b-1, c-1)] = d ans = 0 for ar in itertools.combinations_with_replacement(range(1, M+1), N): D = 0 for com in dic.keys(): if ar[com[1]] - ar[com[0]] == com[2]+1: D += dic[com] if D > ans: ans = D print(ans)
p02917
s826578636
Accepted
N = int(input()) B = [ int (x) for x in input().split()] sum= B[0]+B[-1] for i in range(len(B)-1): sum += min(B[i],B[i+1]) print(sum)
p03067
s212064069
Wrong Answer
a = list(map(int,input().split())) if a[2]>a[0] and a[2]<a[1]: print("Yes") else: print("No")
p03679
s006960005
Accepted
X,A,B=map(int, input().split()) if A>=B: print('delicious') elif A+X>=B: print('safe') else: print('dangerous')
p02608
s942650097
Accepted
N=int(input()) dp=[0]*(10**4+1) for i in range(1,100+1): for j in range(1,100+1): for k in range(1,100+1): a=(i+j)**2+(k+j)**2+(i+k)**2 if 10**4<a//2: break dp[a//2]+=1 for l in range(1,N+1): print(dp[l])
p03380
s075047324
Accepted
n = int(input()) a = list(map(int, input().split())) if n == 2: a = sorted(a) print(a[1], a[0]) exit() max_a = max(a) M = max_a // 2 min_diff = float('inf') r = 0 for i in range(n): if abs(a[i] - M) < min_diff: min_diff = abs(a[i] - M) r = a[i] print(max_a, r)
p03852
s534635364
Wrong Answer
c = input() if c == 'a'or c =='i'or c =='u' or c == 'e'or c == 'o': print('vowel') else: print('constant')