problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03126
u812587837
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['###B - Foods Loved by Everyone\nN, M = map(int, input().split())\nkaito = []\nfor i in range(N):\n kaito.append(list(map(int, input().split())))\n\ncnt = 0\nfor i in range(1, M+1):\n jlist = []\n for j in range(N):\n if i in kaito[j]:\n jlist.append(True)\n else:\n jlist.a...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s118218574', 's631462710', 's829930421']
[3060.0, 3316.0, 3060.0]
[18.0, 20.0, 19.0]
[364, 419, 379]
p03126
u813450934
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n, m = list(map(int, input().split()))\na = []\nfor i in range(n) :\n a.extend(list(map(int, input().split()))[1:])\nprint(a)\nb = []\nfor i in range(1, m + 1) :\n if a.count(i) == n :\n b.append(i)\nprint(len(b))\n', 'n, m = list(map(int, input().split()))\na = []\nfor i in range(n) :\n a.extend(list...
['Wrong Answer', 'Accepted']
['s143414066', 's878188143']
[3060.0, 3060.0]
[19.0, 17.0]
[218, 209]
p03126
u814986259
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['import collections\nN,M=map(int,input().split())\n\ncounter=collections.defaultdict\nfor _ in range(N):\n text = list(input().split())\n for x in text[1:]:\n counter[x]+=1\nans=0\nfor _ in counter:\n if counter[x]== N:\n ans+=1\nprint(ans)', 'import collections\nN,M=map(int,input().split())\n\ncounter=collec...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s110045437', 's821894324', 's731345096']
[3316.0, 3316.0, 3316.0]
[21.0, 21.0, 21.0]
[236, 241, 241]
p03126
u818724291
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m = map(int,input().split())\na = []\nfor i in range(n):\n a.append(list(map(int,input().split())))\n\nb = [x[1:] for x in a ]\n\nc = []\nfor j in range(1,31):\n for k in range(n):\n if j in b[k]:\n c.append(j)\n\nd = [x for x in set(c) if c.count(x) == n]', 'n,m = map(int,input().split())\n...
['Wrong Answer', 'Accepted']
['s666336128', 's468704517']
[3064.0, 3064.0]
[18.0, 18.0]
[269, 284]
p03126
u819710930
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int,input().split())\nlike=[]\nfor i in range(n):\n like+=list(map(int,input().split()))\nans=0\nfor i in range(1,m+1):\n if like.count(i)==n:\n ans+=1\nprint(ans)', 'n,m=map(int,input().split())\nlike=[]\nfor i in range(n):\n like+=list(map(int,input()))\nprint(len(set(like)))', 'n,m=map(int,...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s219304354', 's362582016', 's652426815']
[3060.0, 2940.0, 3060.0]
[18.0, 17.0, 18.0]
[176, 110, 181]
p03126
u821775079
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M = map(int,input().split())\nK=[]\nans=0\nfor _ in range(N):\n K+=[input().split()]\nS=set(K)\nfor s in S:\n if K.count(s)==N:\n ans+=1\nprint(ans)', 'N,M = map(int,input().split())\nK=[]\nans=0\nfor _ in range(N):\n K+=input().split()[1:]\nS=set(K)\nfor s in S:\n if K.count(s)==N:\n ans+=1\nprint(ans)']
['Runtime Error', 'Accepted']
['s632791732', 's987250282']
[3060.0, 3188.0]
[17.0, 19.0]
[146, 148]
p03126
u827141374
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split())\n\nfrom collections import defaultdict\nfav = defaultdict(int)\nfor i in range(N):\n KA = list(map(int, input().split()))\n for i in range(1, KA[0]+1):\n fav[str(KA[i])] += 1\n\nfor i in sorted(fav.keys()):\n if fav[i] == N:\n print(i)', 'N, M = map(int, input()...
['Wrong Answer', 'Accepted']
['s884766183', 's417018695']
[3316.0, 3316.0]
[21.0, 21.0]
[280, 291]
p03126
u830054172
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n, m = list(map(int,input().split()))\nk = [list(map(int,input().split())) for i in range(n)]\n\ndic = {}\nfor i in range(n):\n for j in range(1, k[i][0]+1):\n if k[i][j] in dic:\n dic[k[i][j]] += 1\n else:\n dic[k[i][j]] = 1\n\nprint(dic)\nans = 0\nfor i in dic.values():\n i...
['Wrong Answer', 'Accepted']
['s310738094', 's084523496']
[3064.0, 3064.0]
[18.0, 17.0]
[341, 330]
p03126
u831328139
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['import sys\n\nv = []\nfor line in sys.stdin:\n v.append([int(l) for l in line.split()])\n\nn, m = v[0]\nmin_k = -1\nmin_idx = -1\nfor idx, line in enumerate(v[1:]):\n if min_k == -1 or min_k > line[0]:\n min_k = line[0]\n min_idx = idx + 1\n\ncount = 0\nmin_v = line[min_idx, 1:]\nfor min_v_v in min_v:\n\tif n...
['Runtime Error', 'Accepted']
['s044454920', 's639182969']
[3064.0, 3064.0]
[17.0, 18.0]
[357, 276]
p03126
u833492079
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M = map(int, input().split())\n\nA=[]\nfor i in range(N):\n x = [int(i) for i in input().split()]\n A = A + x[1:]\n\nans = 0\nfrom collections import Counter\nfor k,v in Counter(A).items():\n print(k,v)\n if v==N: ans += 1\n\nprint(ans)\n', 'N,M = map(int, input().split())\n\nA=[]\nfor i in range(N):\n x = [in...
['Wrong Answer', 'Accepted']
['s917756965', 's680138112']
[9500.0, 9460.0]
[31.0, 29.0]
[230, 232]
p03126
u834153484
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split())\nList = list(range(1,M))\nanser = []\ndef judge(N,M,List,anser):\n for i in range(N):\n L = list(map(int, input().split()))\n anser.extend(L)\n anser = list(set(anser))\n print(anser)\n print(M - len(anser))\njudge(N,M,List,anser)\n ', 'N, M = map(int, input().split()...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s311786082', 's994794373', 's807083556']
[3060.0, 3060.0, 3060.0]
[19.0, 18.0, 17.0]
[272, 263, 308]
p03126
u835482198
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['from collections import defaultdict\n\n\nn, m = map(int, input().split())\nd = defaultdict(int)\nfor i in range(n):\n tmp = map(int, input().split())\n for a in tmp[1:]:\n d[a] += 1\ncnt = 0\nfor value in range(d.values()):\n if value == n:\n cnt += 1\nprint(cnt)', 'from collections import defa...
['Runtime Error', 'Runtime Error', 'Accepted']
['s639803755', 's949301200', 's316810420']
[3316.0, 3444.0, 3316.0]
[20.0, 32.0, 21.0]
[273, 280, 273]
p03126
u844005364
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n, m = int(input())\n\nS = set(range(1, m+1))\n\nfor i in range(n):\n K, *a = map(int, input().split())\n S = S & set(A)\n\nprint(len(S))', 'n, m = map(int, input().split())\n \nS = set(range(1, m+1))\n \nfor i in range(n):\n K, *a = map(int, input().split())\n S = S & set(A)\n \nprint(len(S))', 'n, m = map(int, ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s044551272', 's208237411', 's745707085', 's971735774', 's981458964', 's485721089']
[3316.0, 3060.0, 3060.0, 2940.0, 3064.0, 3060.0]
[19.0, 18.0, 18.0, 18.0, 18.0, 18.0]
[131, 147, 293, 253, 278, 298]
p03126
u855781168
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['inp = input().split()\nn = int(inp[0])\nm = int(inp[1])\nfavorite = [] \nfor i in range(n):\n tmp = []\n tmp_inp = input().split()\n k = int(tmp_inp[0])\n for i in range(k):\n tmp.append(int(tmp_inp[i+1]))\n hyou.append(set(tmp))\n\n\ndef intersect_set(list): \n result = list[0]\n for i i...
['Runtime Error', 'Accepted']
['s209458779', 's632727517']
[3064.0, 3064.0]
[18.0, 18.0]
[551, 559]
p03126
u856169020
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split())\n\nlike = list(map(int, input().split()))\nall_like = set()\nfor l in like:\n\tall_like.add(l)\n \nfor i in range(N-1):\n like = list(map(int, input().split()))\n for l in like:\n if l not in all_like:\n all_like.remove(l);\nprint(len(all_like))', 'N, M = map(int, input()...
['Runtime Error', 'Runtime Error', 'Accepted']
['s176613585', 's277405545', 's708800213']
[3060.0, 3060.0, 3444.0]
[20.0, 18.0, 24.0]
[278, 271, 361]
p03126
u859897687
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int,input().split())\na=[0 for i in range(m)]\nfor i in range(n):\n k=list(map(int,input().split()))\n for j in range(1,k[0]):\n a[k[j]-1]=1\n \nprint(m.count(0))', 'n,m=map(int,input().split())\na=[0 for i in range(m)]\nfor i in range(n):\n b=list(map(int,input().split()))\n for i in range(b[0]):\n...
['Runtime Error', 'Accepted']
['s407713576', 's908284567']
[3060.0, 3064.0]
[18.0, 19.0]
[171, 200]
p03126
u863150907
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['import numpy as np\nN, M =map(int,input().split())\nsearch = np.zeros(M+1)\nfor i in range(N):\n K = list(map(int,input().split()))\n for j in range(1,K[0]+1):\n search[K[j]]+=1\nplace = np.where(search==N)\nprint(search)\nprint(place)\nprint(len(place[0]))', 'import numpy as np\nN, M =map(int,input().sp...
['Wrong Answer', 'Accepted']
['s585631091', 's746643921']
[21760.0, 21764.0]
[344.0, 312.0]
[260, 233]
p03126
u866769581
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M = map(int,input().split())\nkind = [0]\nfor res in range (0,M):\n kind.append(0)\nfor x in range (0,N):\n like = map(int,input().split())\n like = list(like)\n for i in range (0,len(like)):\n kind[like[i]] += 1\nprint(kind.count(N))\n', 'N,M = map(int,input().split())\nK = [0,0,0,0,0,0,0,0,0,0,...
['Wrong Answer', 'Accepted']
['s756776798', 's209573078']
[3060.0, 3064.0]
[18.0, 18.0]
[247, 253]
p03126
u868767877
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split(" "))\ndata = []\nfor i in range(N):\n A = list(map(int, input().split(" ")))\n A_ = A[1:].sort()\n data.append(A_)\n \ncounter = 0 \nfor m in range(M):\n flag = 1\n for d in data:\n if m in d:\n flag *= 1\n else:\n flag *= 0\n if flag == 1:\n counter += 1\n\np...
['Runtime Error', 'Accepted']
['s290075115', 's587048459']
[3060.0, 3060.0]
[18.0, 18.0]
[325, 323]
p03126
u873269440
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['\n\ndef main():\n A,B = map(int,input().split())\n \n originalList = set(list(map(int,input().split()))[1:])\n print(originalList)\n for i in range(A-1):\n list1=set(list(map(int,input().split()))[1:])\n print(list1)\n print(type(list1))\n originalList = originalList & list1...
['Wrong Answer', 'Accepted']
['s211316064', 's638723854']
[3064.0, 3060.0]
[18.0, 17.0]
[447, 305]
p03126
u882359130
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = [int(nm) for nm in input().split()]\nfor n in range(N):\n KA = [int(ka) for ka in input().split()]\n for ka in range(len(KA)-1):\n L.append(KA[ka+1])\nlike = 0\nfor m in range(M):\n if L.count(m+1) == N:\n like += 1\nprint(like)', 'N, M = [int(nm) for nm in input().split()]\nL = []\nfor n in range(N):...
['Runtime Error', 'Accepted']
['s262080812', 's005277945']
[3064.0, 3060.0]
[19.0, 18.0]
[235, 242]
p03126
u883203948
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['\ndata = input().split()\nn = int(data[0]) \nm = int(data[1]) \nans = 0\n\n\nj = 1 \ni = 1 \nc = [0] * (m + 1)\n \n\nwhile i <= n:\n tmp = [int(s) for s in input().split()]\n td = tmp[1:] \n tn = tmp[0] \n print(td)\n \n while j <= m: \n \n if j in td: \n j = int(j) \n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s127845822', 's596684601', 's065258675']
[3064.0, 3064.0, 3064.0]
[20.0, 18.0, 18.0]
[1065, 1055, 1048]
p03126
u886112691
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int, input().split())\n\nka=[]\nfor i in range(n):\n atmp=list(input().split())\n ka.append(atmp)\n\n\nlike=ka[0][1::]\nans=len(like)\n\nif n>1:\n for i in range(1,n):\n liketmp=ka[i][1::]\n print(liketmp)\n for j in range(0,len(liketmp)-1):\n if liketmp[j] not in like...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s111464469', 's209024827', 's589737365', 's337119301']
[3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0, 18.0]
[338, 603, 440, 377]
p03126
u891217808
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = input().split(" ")\nS = set(str(i) for i in range(1, int(M)+1))\nprint(S)\n\nfor _ in range(int(N)):\n S = S & set(input().split(" ")[1:])\nprint(len(S))', 'N, M = input().split(" ")\nS = set(str(i) for i in range(1, int(M)+1))\nfor _ in range(int(N)):\n S = S & set(input().split(" ")[1:])\nprint(len(S))...
['Wrong Answer', 'Accepted']
['s292362836', 's734691451']
[3060.0, 3060.0]
[18.0, 17.0]
[157, 147]
p03126
u894258749
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['(N,M) = map(int,input().split())\nr = int32(-1)\nfor i in range(M):\n A = list(map(int,input().split()))\n A.pop(0)\n c = 0\n for a in A:\n c |= (1 << (a-1))\n d &= c\n\nans = sum([(d>>n)&1 for n in range(n)])\nprint(ans)', 'inpl = lambda: list(map(int,input().split()))\nN, M = inpl()\nfav = [1]*M\nfor _ in r...
['Runtime Error', 'Accepted']
['s115576156', 's893321295']
[3060.0, 3060.0]
[18.0, 18.0]
[218, 223]
p03126
u901447859
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['import collections\n\nn,m=list(map(int,input().split()))\n\narr=[]\nfor _ in range(n):\n k,*a=list(map(int,input().split()))\n arr.extend(a)\n \nc = collections.Counter(a)\n\ncnt=0\nfor c_ in c.most_common():\n if n == c_[1]:\n cnt+=1\nprint(cnt)', 'import collections\nn,m=list(map(int,input().split()))\n\narr...
['Wrong Answer', 'Accepted']
['s992627936', 's796987332']
[3316.0, 3316.0]
[21.0, 21.0]
[238, 237]
p03126
u902468164
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n, m = [int(i) for i in input().split(" ")]\n\npre_res = [0 for i in range(m)]\n\nfor i in range(n):\n sel = [int(i-1) for i in input().split(" ")][1:]\n for s in sel:\n pre_res[s] += 1\n\nres = 0\nfor i in range(m):\n if pre_res[s] == n:\n res += 1\n\nprint(res)\n\n', 'n, m = [int(i) for i in ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s168513631', 's439815017', 's483604923', 's461915264']
[3060.0, 3060.0, 21644.0, 3060.0]
[17.0, 17.0, 296.0, 18.0]
[274, 273, 304, 273]
p03126
u912318491
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['import sys\n\nN,M = map(int,input().split())\nmember = dict()\nfor i in range(1,N+1,1):\n j=int(input())\n member[i] = set(int(input()) for _ in range(j))\nif(N==1):\n print(member(1))\n sys.exit(0)\n\nmatch_set=member[1]\nfor i in range(2,N+1,1):\n match_set = match_set & member[i]\n\nprint(match_set....
['Runtime Error', 'Accepted']
['s735325365', 's103571701']
[3060.0, 3060.0]
[19.0, 18.0]
[367, 333]
p03126
u922769680
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M = map(int,input().split())\nans = []\nfor i in range(N):\n KA = list(map(int,input().split()))\n for j in range(1,len(KA)):\n ans[[KA[j]-1]] += 1\nprint(ans.count(N))', 'N,M = map(int,input().split())\nans = [0]*M\nfor i in range(N):\n KA = list(map(int,input().split()))\n for j in range(1,len(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s258773651', 's486131569', 's417583673']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[177, 180, 178]
p03126
u931636178
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M = map(int,input().split())\nans = [0 for _ in range(M)]\nfor _ in range(N):\n like = list(map(int,input().split()))\n for i in like:\n ans[i-1] += 1\nprint(ans.count(N))', 'N,M = map(int,input().split())\nans = [0 for _ in range(M)]\nfor _ in range(N):\n like = list(map(int,input().split()))\n like[0].pop(...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s574531415', 's625972141', 's219797764']
[2940.0, 3060.0, 3060.0]
[18.0, 17.0, 18.0]
[172, 188, 186]
p03126
u932868243
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int,input().split())\nlists=[list(map(int,input().split())) for x in range(n)]\nans=[0]*m\nfor x in range(n):\n k=lists[x][0]\n for t in range(k):\n ans[lists[x][t+1]-1]+=1\ncount=0\nfor y in range(m):\n if ans[x]==n:\n count+=1\nprint(count)', 'n,m=map(int,,input().split())\nans=[0]*m\nl=[list(map(i...
['Runtime Error', 'Runtime Error', 'Accepted']
['s158909971', 's892785334', 's796276222']
[3064.0, 2940.0, 3064.0]
[18.0, 17.0, 18.0]
[248, 220, 224]
p03126
u940279019
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m = map(int,input())\nsum = {}\nans = 0\n\nfor i in range(n):\n k = list(map(int,input().split()))\n for j in range(1,k[0] + 1):\n if k[j] not in sum:\n sum[k[j]] = 1\n else:\n sum[k[j]] += 1\nfor l in sum:\n if sum[l] == n:\n ans += 1\nprint(ans)', 'n,m = map(int,input().split())\nsum = {}\na...
['Runtime Error', 'Accepted']
['s136771934', 's953068961']
[3064.0, 3064.0]
[17.0, 18.0]
[257, 265]
p03126
u947327691
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m= map(int,input().split())\n\nt1=list(map(int,input().split()))\nans=set(t1[1:])\nfor _ in range(n-1):\n t2=list(map(int,input().split()))\n ans &= set(t2[1:])\n\nprint(ans)', 'n,m= map(int,input().split())\n\nt1=list(map(int,input().split()))\nans=set(t1[1:])\nfor _ in range(n-1):\n t2=list(map(int,input...
['Wrong Answer', 'Accepted']
['s497485352', 's688744149']
[3060.0, 3064.0]
[18.0, 17.0]
[174, 179]
p03126
u954488273
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=list(map(int,input().split()))\nt=np.zeros(m)\nfor i in range(n):\n tmp=list(map(int,input().split())) \n for j in range(tmp[0]):\n t[tmp[j+1]-1] += 1\n \nmaxIndex = [i for i, x in enumerate(a) if x == max(tmp)]\nprint(len(maxIndex)', 'n,m=list(map(int,input().split()))\nt=np.zeros(m)\nfor i in range(n):\n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s375691019', 's714851796', 's311272371']
[3060.0, 3060.0, 21780.0]
[17.0, 17.0, 315.0]
[235, 233, 249]
p03126
u957722693
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int,input().split())\nchecks=[0 for i in range(m)]\nprint(len(checks))\nfor i in range(n):\n l=list(map(int,input().split()))\n for j in range(1,len(l)):\n checks[l[j]-1]+=1\nans=checks.count(n)\nprint(ans)', 'n,m=map(int,input().split())\nchecks=[0 for i in range(m)]\nprint(len(checks))\nfor i in range(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s588061848', 's720105287', 's736491276']
[3060.0, 3064.0, 3060.0]
[20.0, 18.0, 17.0]
[211, 243, 192]
p03126
u957957759
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
["import itertools\nn,m=map(int,input().split())\ns=list(input().split() for i in range(n))\nl=[]\nc=0\nfor j in range(n):\n l.append(s[j][1:])\nl=list(itertools.chain.from_iterable(l)) \n\nfor i in range(1,m+1):\n if l.count('i')==n:\n c+=1\nprint(c) \n ", 'import itertools\nn,m=map(int,i...
['Wrong Answer', 'Accepted']
['s817423739', 's514265740']
[3060.0, 3060.0]
[18.0, 18.0]
[270, 273]
p03126
u963915126
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m = map(int,input().split())\n\npref = [0] * (m+1)\nfor i in range(n):\n ka = list(map(int,input().split()))\n for j in range(1,ka[0]):\n pref[ka[j]]+=1\n\nans = 0\nfor p in pref:\n if p == n:\n ans += 1\n\nprint(ans)\n', 'n,m = map(int,input().split())\n\npref = [0] * (m+1)\nfor i in range(n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s669081512', 's923640084', 's536840166']
[3060.0, 2940.0, 3060.0]
[17.0, 17.0, 19.0]
[230, 204, 194]
p03126
u970899068
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['n,m=map(int, input().split())\na= [list(map(int,input().split())) for i in range(n)]\nfor i in range(n):\n del a[i][0]\nprint(a)\nv=[]\n\nx=0\nfor i in range(31):\n for j in range(n):\n v.append(a[j].count(i))\nprint(v)\nfor i in range(0,31,n):\n print(v[i:i+n])\n if v[i:i+n].count(1)==n:\n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s196277374', 's506233881', 's357322299']
[3064.0, 2940.0, 3064.0]
[18.0, 17.0, 18.0]
[320, 75, 290]
p03126
u972474792
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M=map(int,input().split())\nKA=[]\nA=[]\na=0\nfor i in range(N):\n KA.append(list(map(int,input().split())))\nfor i in range(N):\n KA[i].remove(KA[i][0])\nfor i in range(N):\n for j in range(len(KA[i])):\n A.append(KA[i][j])\nprint(A)\nfor i in range(1,M+1):\n if N==A.count(i):\n a+=1\npri...
['Wrong Answer', 'Accepted']
['s176141340', 's379819422']
[8984.0, 9200.0]
[31.0, 34.0]
[308, 299]
p03126
u974935538
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['X,Y = map(int,input().split())\nA = list(map(int,input().split()))\nA = set(A[1:])\nfor i in range(X-1):\n A = list(map(int,input().split()))\n B = B & set(A[1:])\nprint(len(B))', 'x,y = map(int,input().split())\na = list(map(int,input().split()))\nb = set(a[1:])\nfor i in range(x-1):\n a = list(map(int,inpu...
['Runtime Error', 'Accepted']
['s884820316', 's156212282']
[3060.0, 3060.0]
[18.0, 17.0]
[177, 179]
p03126
u982198202
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split())\ndata = []\nfor i in range(N):\n data.append(list(map(int, input().split())))\n#print(data)\ncounter2 = 0\nfor i in range(1, M + 1):\n counter1 = 0\n for ans in data:\n num = ans[0]\n if i in ans[1 : num + 1]:\n counter1 += 1\n print("{} {}...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s624153704', 's735963458', 's957976000', 's429144010']
[3188.0, 3316.0, 2940.0, 3064.0]
[19.0, 19.0, 17.0, 18.0]
[445, 444, 412, 398]
p03126
u986985627
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
["from sys import stdin, exit\nfrom math import factorial\ninput = stdin.readline\nlmi = lambda: list(map(int, input().split()))\nmi = lambda: map(int, input().split())\nsi = lambda: input().strip('\\n')\nssi = lambda: input().strip('\\n').split()\n\nn, m = mi()\nfoods = [0 for i in range(m+1)]\nfor i in range(n):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s372534058', 's921490963', 's015924345']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0]
[438, 455, 442]
p03126
u989326345
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N,M=map(int,input().split())\ns=0\na = [list(input().split())for i in range(N)]\nfor i in range(N):\n del a[i][0]\nb=set(a)\nprint(len(b))', 'N,M=map(int,input().split())\ns=0\na = [list(input().split())for i in range(N)]\nfor i in range(N):\n del a[i][0]\n a[i]=set(a[i])\nc=a[0]\nfor i in range(N):\n c=c...
['Runtime Error', 'Accepted']
['s214142787', 's149136696']
[3060.0, 3060.0]
[17.0, 17.0]
[135, 185]
p03126
u997641430
2,000
1,048,576
Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only l...
['N, M = map(int, input().split())\nK = []\nA = []\nfor n in range(N):\n INPUT = list(map(int, input().split()))\n K.append(INPUT[0])\n A.append(INPUT[1:])\nintersection=set(A[0])\nprint(A)\nfor a in A:\n intersection=intersection&set(a)\nprint(len(intersection))', 'N, M = map(int, input().split())\nK = []\...
['Wrong Answer', 'Accepted']
['s047711922', 's621640274']
[3064.0, 3064.0]
[19.0, 17.0]
[262, 253]
p03127
u000557170
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['# -*- coding: utf-8 -*-\n\nimport sys\nimport math\n\ndef parse_input(lines_as_string = None):\n\n lines = []\n if lines_as_string is None:\n for line in sys.stdin:\n lines.append(line)\n else:\n lines = [e for e in lines_as_string.split("\\n")][1:-1]\n\n \n nm = lines[0].split...
['Runtime Error', 'Accepted']
['s526906487', 's872248453']
[15136.0, 15140.0]
[45.0, 101.0]
[705, 841]
p03127
u007991836
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\na = list(map(int,input().split()))\n\nx = [a[1],a[0],a[1] % a[0]]\na.sort()\nfor i in range(1,n+1):\n while x[2] > 0:\n x[0] = x[1]\n x[1] = x[2]\n x[2] = x[0] % x[1]\n x[0] = a[i+1]\n x[2] = x[0] % x[1]\n\nprint(x[1])\n', 'n = int(input())\na = list(map(int,input().spl...
['Runtime Error', 'Accepted']
['s481262087', 's783394559']
[14224.0, 14252.0]
[114.0, 122.0]
[254, 279]
p03127
u013408661
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['number=int(input())\nhitpoint=list(map(int,input().split()))\nxyz=[]\npng=[]\nm=min(hitpoint)\nfor i in range(len(hitpoint)):\n xyz.append(hitpoint[i]%2)\nif hitpoint.count(hitpoint[0])==len(hitpoint):\n print(hitpoint[0])\nelif hitpoint[len(hitpoint)]%m==0:\n for i in range(len(hitpoint)):\n png.appe...
['Runtime Error', 'Runtime Error', 'Accepted']
['s202047426', 's284810876', 's977177203']
[14436.0, 14480.0, 14252.0]
[63.0, 64.0, 74.0]
[742, 527, 175]
p03127
u016182925
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nmonsters = list(map(int, input().split()))\ndef gcd(a, b):\n\tif b > 0 :\n return gcd(b , a % b)\n else :\n return x\nif len(monster) == 1 :\n\tprint(monster[0])\nelse :\n mon = gcd(monster[0], monster[1])\n if len(monster) >= 2\n for i in range(2 , N) :\n mon = gcd(mon, m...
['Runtime Error', 'Accepted']
['s894005127', 's811352338']
[2940.0, 14252.0]
[17.0, 89.0]
[346, 299]
p03127
u033602950
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import numpy as np\nN = int(input())\nA = np.array(list(map(int, input().split())))\nwhile True:\n\tprint(A)\n\tmin_a = A.min()\n\tnew_A = np.where(A%min_a==0,min_a,A%min_a)\n\tA = new_A\n\tif (np.all(A == A[0])):\n\t\tbreak\nprint(A.min())\n', 'import numpy as np\nN = int(input())\nA = np.array(list(map(int, input()...
['Wrong Answer', 'Accepted']
['s952967296', 's730753924']
[23120.0, 23120.0]
[193.0, 189.0]
[224, 214]
p03127
u044964932
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['from fractions import gcd\n\n\ndef main():\n n = int(input())\n As = list(map(int, input().split()))\n print(n)\n print(As)\n ans = gcd(As[0], As[1])\n for i in range(2, n):\n ans = gcd(ans, As[i])\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'import math\n\n\ndef main():\n...
['Wrong Answer', 'Accepted']
['s675746304', 's055525606']
[16284.0, 20376.0]
[93.0, 78.0]
[268, 246]
p03127
u062621835
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input()) \na = [int(i) for i in input().split() ]\n\na = list(set(a))\na.sort()\nwhile len(a) > 1:\n while (a[0] < a[1]):\n a[1] -= a[0]\n a = list(set(a))\n a.sort()\n if a[0] == 1:\n break\n if len(a) == 2:\n a[0] = a[1]%a[0]\n break\nprint(a[0])', 'n = int(input()...
['Wrong Answer', 'Accepted']
['s525818382', 's532686063']
[14984.0, 14224.0]
[2104.0, 317.0]
[291, 275]
p03127
u062847046
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nlist_A = list(map(int,input().split()))\nfor _ in range(100):\n min_A = min(list_A)\n list_A.remove(min_A)\n l = np.array([list_A]) % min_A\n lr = list(l.ravel())\n lr.append(min_A)\n list_A = [x for x in lr if x != 0]\n if len(list_A) <= 1:\n break\nprint(list_A[0])', 'i...
['Runtime Error', 'Accepted']
['s508119352', 's564172838']
[14224.0, 23124.0]
[44.0, 326.0]
[302, 321]
p03127
u063052907
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\nlst_a = list(map(int, input().split()))\n\ndef gcd(a, b):\n if b==0:\n return a\n else:\n gcd(b, a%b)\n\nans = lst_a[0]\nfor a in lst_a:\n \n ans = gcd(ans, a)\n\nprint(ans)', 'n = int(input())\nlst_a = list(map(int, input().split()))\n\ndef gcd(a, b):\n if b==0:\n ...
['Runtime Error', 'Accepted']
['s111293403', 's392550132']
[15020.0, 14224.0]
[43.0, 84.0]
[286, 293]
p03127
u070449185
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\n2.b = list(map(int,input().split()))\n3.b.sort()\n4. \n5.d = b[0] + 0\n6. \n7.while len(b) > 1 :\n8. for i in range(1,len(b)) :\n9. b[i] = b[i] % b[0]\n10. if b.count(0) == len(b)-1 :\n11. d = b[0]\n12. break\n13. else :\n14. b.sort()\n15. for j in ran...
['Runtime Error', 'Accepted']
['s523043828', 's375227773']
[2940.0, 14252.0]
[17.0, 85.0]
[360, 196]
p03127
u077141270
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
["from sys import stdin\n\ndef fun():\n n = (int(i) for i in input().split())\n\n l = [int(x) for x in stdin.readline().rstrip().split()]\n\n l = list(set(l))\n\n while 1 < len(l):\n for i in range(1, len(l)):\n if l[i]%l[0] == 0:\n l[i] = l[0]\n elif l[i] - l[i-1...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted']
['s354847596', 's788160519', 's989763043', 's402907097']
[14428.0, 14428.0, 18548.0, 14480.0]
[2104.0, 2104.0, 2103.0, 99.0]
[620, 585, 655, 655]
p03127
u080880358
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['\nN=int(input())\nA=sorted(map(int,input().split()))\nwhile len(A) != 1:\n\tB_nonzeros=[A[0]]\n\tfor n in range(len(A)):\n\t\ti = A[n]%A[0]\n\t\tif i != 0:\n\t\t\tB_nonzeros.append(i)\n\tB_nonzeros.sort()\n\tA=B_nonzeros\n\tprint(A)\nprint(A[0])', '\nN=int(input())\nA=sorted(map(int,input().split()))\nwhile len(A) !=...
['Wrong Answer', 'Accepted']
['s515458797', 's841004062']
[14252.0, 14252.0]
[164.0, 156.0]
[234, 224]
p03127
u083960235
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n=int(input())\na=list(map(int,input().split()))\nb=[]\ne=False\nwhile e==False:\n b=[]\n a_m=[]\n for i in a:\n if i!=0:\n a_m.append(i)\n print(a_m)#a=m a of positive\n temp=min(a_m)\n #5\n for i in a:\n g=i%temp\n if i==temp:\n b.append(i)#myself\n ...
['Wrong Answer', 'Accepted']
['s186881467', 's266948443']
[15544.0, 14252.0]
[157.0, 136.0]
[644, 648]
p03127
u092620892
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n=input()\na=list(map(int,input().split()))\nfor i in range(0,len(a)):\n a[i]=a[i]%min(a)\n a.append(min(a))\n for j in range(len(a)):\n if a[j]==0:\n a.remove(a[j])\nprint(a[0])', 'n=input()\na=list(map(int,input().split()))\nk=[0,99999999]\nfor i in range(0,n):\n a[i]=a[i]%min(a)\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s525104635', 's780455051', 's680999751']
[14224.0, 14252.0, 15020.0]
[168.0, 45.0, 62.0]
[197, 221, 193]
p03127
u096820121
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\na = input().split()\nfor i in range(n):\n a[i] = int(a[i])\na = sorted(a)\nwhile len(a) > 1:\n for i in range(1:len(a)):\n if a[len(a)-1-i] % a[0] == 0:\n a.pop()\n else: a[len(a)-1-i] %= a[0]\n a = sorted(a)\nprint(a[0])', 'n = int(input())\na = input().split()\nfo...
['Runtime Error', 'Accepted']
['s339868728', 's245337506']
[2940.0, 11096.0]
[17.0, 102.0]
[262, 285]
p03127
u101742684
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import fraction\nfrom functools import reduce\n\n\ndef gcd_list(numbers):\n return reduce(fraction.gcd, numbers)\n\n\nN = input()\nA = input().split()\nfor i in range(len(A)):\n A[i] = int(A[i]) \nprint("{}".format(gcd_list(A)))', 'from functools import reduce\n\ndef gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\...
['Runtime Error', 'Accepted']
['s472425537', 's128767863']
[2940.0, 11596.0]
[17.0, 84.0]
[222, 265]
p03127
u116233709
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n=int(input())\na=list(map(int,input().split()))\na.sort()\n\nwhile len(a)>=2:\n for i in range(1,len(a)):\n a[i]=a[i]%a[0]\n if 0 in a:\n a.remove(0)\n a.sort()\n \n\nprint(a[0])', 'n=int(input())\na=list(map(int,input().split()))\ndef gcd(x,y):\n if x%y==0:\n return y\n else:\n return(y,x%y)\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s008815100', 's029304471', 's482230197']
[14252.0, 14252.0, 14224.0]
[135.0, 66.0, 84.0]
[179, 180, 184]
p03127
u119982147
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\na = list(map(int, input().split()))\n\n\ndef gcd(a, b):\n if a <= b:\n if b % a == 0:\n return a\n else:\n return(gcd(b % a, a))\n else:\n if a % b == 0:\n return b\n else:\n return(gcd(a % b, b))\n\n\nans = 0\n\nfor i in ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s329362380', 's660657211', 's723141271', 's405961651']
[14252.0, 14480.0, 14228.0, 14252.0]
[2104.0, 84.0, 2104.0, 71.0]
[548, 344, 541, 368]
p03127
u119983020
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nA = [int(n) for n in input().split()]\n\ndef gcd(a,b):\n while b>0:\n a, b = b, a%b \n return a\n\ntemp_gcm = gcm(A[0],A[1])\n for i in range(2,N):\n temp_gcm = gcm(A[i],temp_gcm)\nprint(temp_gcm)\n', 'N = int(input())\nA = [int(n) for n in input().split()]\n\ndef gcd(a,b):\n while...
['Runtime Error', 'Runtime Error', 'Accepted']
['s159948012', 's639407933', 's662684445']
[2940.0, 14252.0, 14224.0]
[18.0, 47.0, 74.0]
[221, 209, 219]
p03127
u129492036
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['# -*- coding: utf-8 -*-\nfrom functools import reduce\n\ndef gcd(a, b):\n x = max(a, b)\n y = min(a, b)\n z = y\n while x%y != 0:\n z = x%y\n x = y\n y = z\n else:\n return z\n\ndef gcd_list(numbers):\n return reduce(math.gcd, numbers)\n\n\nN = int(input())\n\nA = list(ma...
['Runtime Error', 'Accepted']
['s172099357', 's776243558']
[14748.0, 14596.0]
[48.0, 96.0]
[342, 350]
p03127
u144980750
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n=int(input())\na=[map(int,input().split()) for i in range(n)]\nb=a[0]\ndef gcd(x,y):\n while y:\n x,y=y,x%y\n return x\n\nfor i in a:\n b=gcd(b,i)\nprint(b)', 'n=int(input())\na=[int(i) for i in input().split()]\nb=a[0]\ndef gcd(x,y):\n while y:\n x,y=y,x%y\n return x\n\nfor i in a:\n b=gcd(b,i)\nprint(b...
['Runtime Error', 'Accepted']
['s502075953', 's072645172']
[11096.0, 14252.0]
[28.0, 70.0]
[153, 142]
p03127
u163320134
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['def gcd(a,b):\n a,b=max(a,b),min(a,b)\n if b==0:\n return a\n else:\n return gcd(b,a%b)\n \nn=int(input())\narr=list(map(int,input().split()))\nfor i in range(n-1):\n tmp=gcd(arr[i],arr[i+1])\nprint(tmp)', 'def gcd(a,b):\n a,b=max(a,b),min(a,b)\n if b==0:\n return a\n else:\n return gcd(b,a%b)\n\nn...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s139551292', 's738962305', 's803478458', 's917615552']
[15020.0, 5028.0, 5132.0, 14224.0]
[956.0, 19.0, 19.0, 147.0]
[202, 193, 212, 220]
p03127
u169350228
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['from math import gcd\nn = int(input())\na = list(map(int,input().split()))\n\ng = a[0]\nfor i in a:\n g = gcd(g,i)\n\nprint(i)\n', 'from math import gcd\nn = int(input())\na = list(map(int,input().split()))\n\ng = a[0]\nfor i in a:\n g = gcd(g,i)\n\nprint(g)\n']
['Wrong Answer', 'Accepted']
['s175917561', 's054333299']
[20392.0, 20356.0]
[52.0, 54.0]
[122, 122]
p03127
u177756077
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N=int(input())\nA=list(map(int,input().split()))\n\nwhile len(A)!=1:\n\n A.sort()\n if A.count(0):A.remove(0)\n for i in range(len(A)-1): \n A[i+1]=A[i+1]%A[0]\n\nprint(max(A))', 'N=int(input())\nA=list(map(int,input().split()))\n\nwhile len(set(A)) != 1:\n A.sort()\n print(A)\n B=...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s340319525', 's924294718', 's039539688']
[14252.0, 14224.0, 14224.0]
[158.0, 2104.0, 114.0]
[212, 249, 171]
p03127
u193927973
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N=int(intput())\nM=list(map(int, input().split()))\nans=min(M)\nfor m in M:\n if m%ans!=0:\n ans=1\n break\nprint(ans)', 'N=int(input())\nM=list(map(int, input().split()))\nans=min(M)\nmn=Min(M)\nfrom math import gcd\nfor m in M:\n if m%ans!=0:\n ans=min(ans, gcd(mn,m))\nprint(ans)', 'N=int(input())\nM=lis...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s488596823', 's558413219', 's566294205', 's660504585', 's593187261']
[8996.0, 20028.0, 19944.0, 20036.0, 20064.0]
[26.0, 51.0, 50.0, 51.0, 92.0]
[118, 156, 156, 134, 156]
p03127
u201856486
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['# coding: utf-8\nimport sys\n\n\n# import math\n# import itertools\n\nimport numpy as np\n\n\n"""Template"""\n\n\nclass IP:\n \n\n def __init__(self):\n self.input = sys.stdin.readline\n\n def I(self):\n \n return int(self.input())\n\n def S(self):\n \n return self.input...
['Wrong Answer', 'Accepted']
['s588724522', 's515816730']
[23312.0, 14224.0]
[180.0, 318.0]
[4793, 393]
p03127
u224554402
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n= int(input())\na_list = list(map(int, input().split()))\ngcd = a_list[0]\nfor i in range(1,n):\n gcd = math.gcd(gcd,a_list[i])\n \n \nprint(gcd)', 'import math\nn= int(input())\na_list = list(map(int, input().split()))\ngcd = a_list[0]\nfor i in range(1,n):\n gcd = math.gcd(gcd,a_list[i])\n \n \np...
['Runtime Error', 'Accepted']
['s601855343', 's855400350']
[19832.0, 20432.0]
[48.0, 68.0]
[148, 160]
p03127
u227476288
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import math\n \nN = int(input())\nA = [int(i) for i in input().split()] \n\n \nprint(math.gcd(A))', 'def gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\nN = int(input())\nA = [int(i) for i in input().split()]\ng = A[0]\nfor n in range(1,N):\n g = gcd(g,A[n])\n\nprint(g)']
['Runtime Error', 'Accepted']
['s418029183', 's070345652']
[14252.0, 14224.0]
[46.0, 77.0]
[91, 168]
p03127
u231936499
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N=int(input())\na_list=[]\na_list = list(map(int, input().split())) \nmin_num=min(a_list)\nnokori_list=[i%min_num for i in a_list if i%min_num!=0]\nanswer=0\nif len(nokori_list)==0:\n print(min_num)\nelse:\n can_min=min(nokori_list)\n futuer_min=min_num%can_min\n while futuer_min>0:\n big=max(can_m...
['Runtime Error', 'Accepted']
['s778427194', 's582729848']
[3064.0, 14224.0]
[17.0, 71.0]
[510, 556]
p03127
u246820565
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\nA = list(map(int,input().split()))\n\n\n\n\ndef gcd(a,b):\n\tif b == 0:\n\t\treturn a\n\treturn gcd(b,a%b)\n\n\nx = A[0]\nfor i in a[1:]:\n\tx = gcd(x,i)\nprint(x)', 'n = int(input())\nA = list(map(int,input().split()))\n\n\n\n\ndef gcd(a,b):\n\tif b == 0:\n\t\treturn a\n\treturn gcd(b,a%b)\n\n\nx =...
['Runtime Error', 'Accepted']
['s634899270', 's266476238']
[14252.0, 14252.0]
[43.0, 84.0]
[416, 416]
p03127
u249987458
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input())\na = list(map(int, input().split()))\nif max(a) != min(a):\n while a.count(0) != len(a)-1:\n print(a)\n a.sort()\n b = [a[0]]\n for i in a[1:]:\n if i%a[0] != 0:\n b.append(i%a[0])\n a = b\n print(max(a))\nelse:\n print(a[0])', 'n ...
['Wrong Answer', 'Accepted']
['s590233766', 's234300440']
[20000.0, 20004.0]
[125.0, 112.0]
[299, 282]
p03127
u252828980
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import math\nfrom functools import reduce\nn = int(input())\nli = list(map(int,input().split())\nprint(reduce(math.gcd,li))\n', 'n = int(input())\nL = list(map(int,input().split()))\n\ndef gcd(x,y):\n if y > x:\n x,y = y,x\n if x%y == 0:\n return y\n else:\n return gcd(y,x%y)\n \n...
['Runtime Error', 'Accepted']
['s166255069', 's470492646']
[2940.0, 19936.0]
[17.0, 64.0]
[120, 237]
p03127
u253527353
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import numpy as np\n\nn = int(input())\n\na = input().split(\' \')\n\na = np.array(a).astype(int)\n\n\nwhile a[a>0].shape[0] > 1:\n not_0_a = a[a!=0]\n min_ = not_0_a.min()\n min_i = np.where(a == min_)\n a = a % min_\n a[min_i[0][0]] = min_\n print(a)\n\n """\n if a[a>0].shape[0] == 1:\n not_0_a = a[a!=0]...
['Wrong Answer', 'Accepted']
['s440811101', 's841843232']
[27420.0, 27424.0]
[205.0, 202.0]
[397, 386]
p03127
u278356323
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['# ABC118c\nfrom fractions import gcd\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**6)\n\nn = int(input())\na = list(map(int, input().split()))\n#from functools import reduce\n\n\ndef gcds(*numbers):\n return reduce(gcd, numbers)\n\n\nprint(gcds(a))\nexit(0)\n\n\ndef solve(l):\n m = min(l)\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s293117994', 's675180387', 's134137428']
[16304.0, 16244.0, 14252.0]
[61.0, 71.0, 74.0]
[491, 490, 356]
p03127
u286955577
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['def f(a, m):\n if a % m == 0:\n return m\n else:\n return a % m\n\ndef solve():\n N = int(input())\n A = list(map(int, input().split()))\n while True:\n m = min(A)\n print(list(map(lambda a: f(a, m), A)))\n A = list(map(lambda a: f(a, m), A))\n if all([a == m for a in A]): return m\n\nprint(sol...
['Wrong Answer', 'Accepted']
['s372222384', 's527888890']
[14252.0, 15020.0]
[175.0, 104.0]
[309, 266]
p03127
u289036437
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input()) \na = list(map(int, input().split()))\ny = a[0]\nfor i in range(1,n):\n x = a[i]\n if(x < y):\n c = x\n x = y\n y = c\n while(y != 0):\n print(x,y)\n c = x % y\n x = y\n y = c\n y = x\n if(y == 1):\n break\nprint(y)', 'n = int(inp...
['Wrong Answer', 'Accepted']
['s614961003', 's400936080']
[14252.0, 14252.0]
[203.0, 88.0]
[286, 267]
p03127
u305018585
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
["import numpy as np\ni = input()\nN = list(map(int, input().split(' ')))\ndef one_turn(l):\n l.sort()\n n = l[0]\n n2 = l[1]\n \n return np.array([n,n2]+[ i-n for i in l[2:] if ((i%n != 0)or(i%n2 != 0)) ])\n\nif len(set(N)) == 1 :\n print(N[0])\nelse :\n N = np.array(N)\n while True :\n N = one_turn(N)\n ...
['Time Limit Exceeded', 'Accepted']
['s013705161', 's160034700']
[23320.0, 38064.0]
[2110.0, 173.0]
[395, 196]
p03127
u320567105
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import math', 'def main():\n input()\n A = list(map(int,input().split()))\n\n b = min(A)\n for a in A:\n while True:\n if a%b == 0:\n break\n a,b = b, a%b\n print(b)\n\nmain()']
['Wrong Answer', 'Accepted']
['s399079747', 's178558616']
[2940.0, 14224.0]
[17.0, 54.0]
[11, 207]
p03127
u321035578
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
["import fractions\ndef main():\n n = int(input())\n a = list(map(int,input().split()))\n a.sort()\n ans = a[0]\n for i,a_i in enumerate(a,1):\n if ans == a_i:\n continue\n elif ans % a_i == 0 or a_i % ans == 0:\n ans = min(ans, fractions.gcd(ans,a_i))\n elif an...
['Wrong Answer', 'Accepted']
['s435934077', 's186776160']
[16292.0, 15148.0]
[155.0, 379.0]
[483, 415]
p03127
u327619396
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nmonsters = list(map(int, input().split()))\n\nmonsters.sort(reverse=True)\nprint(monsters)\nans = min(monsters)\n\nwhile ans > 0:\n maxnum = max(monsters)\n minnum = min(monsters)\n maxidx = monsters.index(maxnum)\n\n if maxnum % minnum == 0:\n del monsters[maxidx]\n if len...
['Wrong Answer', 'Accepted']
['s626234565', 's872862584']
[14252.0, 14252.0]
[2104.0, 112.0]
[441, 548]
p03127
u336721073
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nA = list(map(int, input().split(" ")))\nA = [a for a in A if a >= 1]\n\ndef gcd(x, y):\n while y != 0:\n x, y = y, x % y\n return x\n\ntemp = A[0]\nfor i in range(N-1):\n temp = gcd(A[i], A[i+1])\n if temp == 1:\n break\nprint(temp)', 'N = int(input())\nA = list(map(int, in...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s276359331', 's633332223', 's436553841']
[14224.0, 15020.0, 14224.0]
[149.0, 146.0, 84.0]
[262, 233, 262]
p03127
u347452770
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['n = int(input()) # the num of monster\n\nls = list(map(int, input().split()))\n\nls.sort()\n\nfor i in range(len(ls)-1):\n if(len(ls)==1):\n print(len[0])\n for j in range(1, len(ls)):\n if(ls[j] % ls[i] == 0):\n ls.remove(ls[j])\n\n', 'n = int(input()) # the num of monster\n \nls = list(map(int, input()...
['Runtime Error', 'Runtime Error', 'Accepted']
['s626780272', 's984813759', 's292214389']
[14252.0, 14224.0, 14224.0]
[2108.0, 42.0, 75.0]
[233, 184, 241]
p03127
u350997995
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['from fractions import gcd\nn = int(input())\na = list(map(int,input().split()))\nmina = max(a)\na.sort()\nfor i in range(n-1):\n mina = min(mina,math.gcd(a[i],a[i+1]))\nprint(mina)\n', 'from fractions import gcd\nn = int(input())\na = list(map(int,input().split()))\nmina = max(a)\nfor i in range(n-1):\n mina = ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s291421584', 's953025499', 's351215856']
[16284.0, 16280.0, 14224.0]
[100.0, 64.0, 263.0]
[177, 168, 225]
p03127
u353797797
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['while len(h)>1:\n kh=[]\n for i in range(len(h)):\n mn = min(h)\n md=h[i]%mn\n if md!=0:\n kh.append(md)\n kh.append(mn)\n h=list(set(kh))\nprint(mn)', 'def gcd(x,y):\n while y:\n x,y=y,x%y\n return x\n\nn=int(input())\na=list(map(int,input().split()))\nans...
['Runtime Error', 'Accepted']
['s195471316', 's570760495']
[2940.0, 14224.0]
[17.0, 69.0]
[188, 163]
p03127
u365364616
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['from fraction import gcd\n\nn = int(input())\na = list(map(int, input().split()))\nx = a[0]\nfor i in range(1, n):\n x = gcd(x, a[i])\n if x == 1:\n break\nprint(x)\n', 'def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\nn = int(input())\na = list(map(int, input().split()))\nx = a[0]\...
['Runtime Error', 'Accepted']
['s055748890', 's291820330']
[2940.0, 14252.0]
[18.0, 72.0]
[169, 180]
p03127
u365858785
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import math\nn=int(input())\nlis=list(map(int,input().split()))\ni=0\nwhile len(lis)<i:\n lis+=math.gcd(lis[i],lis[i+1])\nprint(lis[-1])', 'def gcd(a,b):\n if b==0:\n return a\n else:\n return gcd(b,a%b)\nn=int(input())\nlis=list(map(int,input().split()))\ni=0\nwhile len(lis)-1>i:\n lis+=[gcd(lis[i],lis[i+1...
['Wrong Answer', 'Accepted']
['s098803353', 's847204290']
[15020.0, 14224.0]
[42.0, 242.0]
[131, 193]
p03127
u374103100
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['\n\ndef main():\n N = int(input())\n A = list(map(int, input().split())) \n\n while True:\n A.sort()\n print(A)\n min_diff = A[0]\n diff_index = -1\n for i in range(1, N):\n diff = A[i] - A[i - 1]\n # print("{} - {} == {}".format(A[i], A[i - 1], diff)...
['Wrong Answer', 'Accepted']
['s085749005', 's091506802']
[14252.0, 14224.0]
[130.0, 188.0]
[753, 479]
p03127
u375542418
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import numpy as np\n\nN = int(input())\n\nA = [int(i) for i in input().split()]\nA = np.array(A)\nprint(N,A)\n\nmin_amari = min(A)\nwhile 0==0:\n amari = A%min_amari\n amari = amari[amari!=0]\n if len(amari)==0:\n print(min_amari)\n break\n else:\n min_amari = min(amari)', 'import numpy as np\n\nN = int(...
['Wrong Answer', 'Accepted']
['s386544653', 's328321740']
[23128.0, 23124.0]
[203.0, 200.0]
[268, 259]
p03127
u382748202
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b)\n\n\ndef gcd_arr(a):\n ans = a[0]\n for i, a_i in enumerate(a):\n ans = gcd(ans, a_i)\n return ans\n\nprint(gcd_arr(A))', 'N = int(input())\nA = list(map(int, input().split()))\n\n\ndef gcd(a, b):\n if b == 0:\n retur...
['Runtime Error', 'Accepted']
['s410751839', 's078651714']
[2940.0, 14252.0]
[17.0, 81.0]
[198, 253]
p03127
u384793271
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import heapq\n\nn = int(input())\nA = list(map(lambda x: int(x) * (-1), input().split()))\n\nheapq.heapify(A)\n\nwhile len(A) > 1:\n print(A)\n Amax1 = heapq.heappop(A) * (-1)\n Amax2 = heapq.heappop(A) * (-1)\n pushA = Amax1 % Amax2\n if pushA == 0:\n heapq.heappush(A, Amax2 * (-1))\n else:\...
['Runtime Error', 'Accepted']
['s169240443', 's585594248']
[142680.0, 14184.0]
[1520.0, 492.0]
[403, 390]
p03127
u412179193
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['def gcd(a,b):\n lt,gt = sorted([a,b])\n if lt == 0:\n return gt\n else:\n return gcd(gt % lt,lt)\n\ndef q3():\n N = int(input())\n A = list(map(int,input().split()))\n assert(N == len(A))\n ret = A[0]\n for n in range(1,N):\n ret = gcd(ret,A[n])\n print(ret)', 'def gcd(...
['Wrong Answer', 'Accepted']
['s022390668', 's518704925']
[3064.0, 14252.0]
[17.0, 140.0]
[292, 302]
p03127
u416773418
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N=int(input())\nA=[i for i in map(int,input().split())]\nmini=min(A)\nwhile mini>0:\n for i in range(len(A)):\n if A[i]!=mini:\n A[i]=A[i]%mini\n z=A.count(0)\n A=sorted(A)[z:]\n m=A[0]\n if m==1:\n break\nprint(A[0])', 'N=int(input())\nA=[int for i in input().split()]\nmini=mi...
['Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s090584133', 's670355469', 's784171168']
[14224.0, 11096.0, 14252.0]
[2104.0, 31.0, 109.0]
[245, 308, 319]
p03127
u417027396
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['import numpy as np\nn = int(input()) \n#n=3\nlst = [int(i) for i in input().split()]\n#lst = [2, 10, 8, 40]\n#lst = [5, 13, 8, 1000000000]\n#lst = [1000000000, 1000000000, 1000000000]\nhps = np.array(lst)\nwhile(1):\n hps = sorted(hps)\n print(hps)\n if(hps[0]==0): break\n if(hps[0]==hps[n-1]): break\n ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s003379176', 's340021880', 's348878023', 's376422837', 's459678655', 's711252887', 's727741779', 's895927863', 's668280836']
[31604.0, 22460.0, 5028.0, 14252.0, 23888.0, 14252.0, 14224.0, 23120.0, 14224.0]
[2109.0, 299.0, 22.0, 105.0, 564.0, 46.0, 80.0, 825.0, 113.0]
[344, 299, 172, 320, 476, 173, 348, 382, 435]
p03127
u432333240
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['N = int(input())\nHP_list = [int(i) for i in input().split()]\nwhile len(set(HP_list))>1:\n for i in range(0, len(set(HP_list))):\n min_HP = min(HP_list)\n if HP_list[i] > min_HP:\n HP_list[i] = HP_list%min_HP\n if HP_list[i]==0:\n HP_list[i] += min_HP\nprint(list...
['Runtime Error', 'Accepted']
['s111134372', 's443505048']
[14252.0, 23100.0]
[61.0, 216.0]
[327, 202]
p03127
u434872492
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['def solve(m_list):\n m_val = m_list[0]\n for i in m_list:\n m_val = min(m_val,gcd(min_val,m))\n return m_val\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef main():\n n = int(input())\n m_list = list(map(int,input().split()))\n\n ans = solve(m_list)\n print(ans)\n\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s203344500', 's593996173', 's691681403', 's916868938', 's956404847']
[14252.0, 14224.0, 14224.0, 14252.0, 14224.0]
[42.0, 42.0, 42.0, 42.0, 76.0]
[307, 305, 340, 309, 305]
p03127
u436335113
2,000
1,048,576
There are N monsters, numbered 1, 2, ..., N. Initially, the health of Monster i is A_i. Below, a monster with at least 1 health is called alive. Until there is only one alive monster, the following is repeated: * A random alive monster attacks another random alive monster. * As a result, the health of the monst...
['# gcd\ndef gcd(a, b):\n\treturn gcd(b, a % b) if b != 0 else a\n\nL = [int(x) for x in input().split()]\n\nmax_gcd = L[0]\n\nfor i in range(1, N):\n max_gcd = gcd(max_gcd, L[i])\n\nprint(max_gcd)\n', '# gcd\ndef gcd(a, b):\n\treturn gcd(b, a % b) if b != 0 else a\n\nN = int(input())\nL = [int(x) for x in input().s...
['Runtime Error', 'Accepted']
['s719819318', 's793892045']
[3060.0, 14252.0]
[17.0, 90.0]
[187, 204]