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
p03293
u869154953
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['S=input()\nT=input()\n\nans = "No"\nfor i in range(len(S)):\n\tif S[:i] + S[0:i] == T:\n\t\tans = "Yes"\n\nprint(ans)', 'ans = "No"\nfor i in range(len(S)):\n\tif S[:i] + S[0:i] == T:\n\t\tans = "Yes"\n\nprint(ans)', 'S=input()\nT=input()\n\nans = "No"\nfor i in range(len(S)):\n\tif S[:i] + S[0:1] == T:\n\t\tans = "Y...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s103327390', 's268687744', 's487083434', 's921043540']
[8880.0, 8952.0, 9096.0, 8840.0]
[28.0, 22.0, 30.0, 29.0]
[106, 85, 107, 107]
p03293
u870198083
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s=list(input())\nt=list(input())\nans="NO"\nfor i in range(len(s)):\n if s==t:\n ans="YES"\n break\n temp=s.pop()\n s.insert(0,temp)\nprint(ans)', 's=list(input())\nt=list(input())\nans="No"\nfor i in range(len(s)):\n if s==t:\n ans="Yes"\n break\n temp=s.pop()\n s.insert...
['Wrong Answer', 'Accepted']
['s129704862', 's049502005']
[3060.0, 2940.0]
[17.0, 17.0]
[158, 158]
p03293
u884531978
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['import sys\n\nl = list(input())\ns = list(input())\n\nfor i in range(len(l)):\n if l == s:\n print("Yes")\n sys.exit(0)\n l = l[1:]+list(l[0])\n print(l)\nprint("No")\n', 'import sys\n\nl = list(input())\ns = list(input())\n\nfor i in range(len(l)):\n if l == s:\n print("Yes")\n ...
['Wrong Answer', 'Accepted']
['s141158154', 's993245405']
[3060.0, 2940.0]
[18.0, 17.0]
[179, 166]
p03293
u889344512
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = str(input())\nt = str(input())\n\nst = False\nfor i in range(0,len(s)-1):\n s = s[-1]+s[0:len(s)-1]\n if s==t:\n st = True\n print("yes")\n break\nif not st:\n print("No")', 's = str(input())\nt = str(input())\n\nst = False\nfor i in range(0,len(s)-1):\n print(s)\n s = s[-1]+s[...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s582509567', 's716745272', 's349965713']
[3060.0, 3060.0, 3060.0]
[19.0, 18.0, 17.0]
[194, 220, 192]
p03293
u893063840
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n print(s, t)\n if s == t:\n print("Yes")\n break\nelse:\n print("No")\n', 's = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n print("Yes")\n break\nelse:\n pr...
['Wrong Answer', 'Accepted']
['s599288393', 's220816154']
[3060.0, 3064.0]
[18.0, 18.0]
[160, 144]
p03293
u898421873
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['\n\ns = input()\ntest = input()\n\nfor i in range(len(s)):\n s_right = s[i:]\n s_left = s[:i]\n\n s_rot = s_right + s_left\n \n print(s_rot)\n\n if s_rot == test:\n print("Yes")\n break\nelse:\n print("No")', '\n\ns = input()\ntest = input()\n\nfor i in range(len(s)):\n s_right =...
['Wrong Answer', 'Accepted']
['s171050275', 's011157599']
[3060.0, 3060.0]
[17.0, 17.0]
[291, 292]
p03293
u898967808
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["s = input()\nt = input()\nif s== t[::-1]:\n print('Yes')\nelse:\n print('No')\n", "s = input()\nt = input()\n\nans = 'No'\nfor i in range(len(t)):\n if s == t[i:]+t[:i]:\n ans = 'Yes'\n break\nprint(ans) "]
['Wrong Answer', 'Accepted']
['s962014475', 's214450857']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 123]
p03293
u904804404
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s1,s2 =input(),input()\nfor i in range(len(s1)):\n if(i==0):\n if(s1==s2):\n print("Yes")\n break\n if(s1[i:]+s1[:i-1] == s2):\n print("Yes")\n break\nelse:\n print("No")', 's1,s2 =input(),input()\nfor i in range(len(s1)):\n if(i==0):\n if(s1==s2):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s386992790', 's641527183', 's616428547']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[212, 238, 210]
p03293
u904943473
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["s1 = list(input())\n\ns2 = list(input())\n\nans = 'No'\n\nfor i in range(len(s1)-1):\n print(s1)\n if (s1 == s2):\n ans = 'Yes'\n break\n last = s1.pop()\n s1.insert(0,last)\nprint(ans)\n ", 's1 = list(input())\n\ns2 = list(input())\n\nans = \'No\'\n\nfor i in range(len(s1)):\n if ("".join(s1) == "".join(...
['Wrong Answer', 'Accepted']
['s941134410', 's438129157']
[3060.0, 2940.0]
[19.0, 17.0]
[185, 191]
p03293
u905203728
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s=list(input())\nt=input()\nfor i in range(len(s)):\n s.insert(0,s.pop())\n word="".join(s)\n if s==t:\n print("Yes")\n exit()\nprint("No")', 's=list(input())\nt=input()\nfor i in range(len(s)):\n s.insert(0,s.pop(-1))\n word="".join(s)\n if s==t:\n print("Yes")\n exit()\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s002895449', 's589678137', 's682222973', 's661161192']
[2940.0, 3060.0, 3316.0, 2940.0]
[18.0, 17.0, 20.0, 17.0]
[154, 156, 190, 157]
p03293
u905582793
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s=input()\nt=input()\nfor i in range(len(s)+1):\n if s == t:\n print("Yes")\n break\n else:\n k = s[0]\n for i in range(len(s)-1):\n s[i]=s[i+1]\n s[-1] = k\nelse:\n print("No")', 's=list(input())\nt=list(input())\nfor i in range(len(s)+1):\n if s == t:\n print("Yes")\n break\n else:\n ...
['Runtime Error', 'Accepted']
['s620522906', 's325727701']
[3064.0, 3060.0]
[17.0, 19.0]
[188, 200]
p03293
u919633157
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["s=list(input())\nt=list(input())\nans='No'\nfor i in range(len(s)+1):\n if s==t:\n ans='Yes'\n break\n s.insert(0,s.pop())\n print(s)\nprint(ans)", "s=list(input())\nt=list(input())\nans='No'\nfor i in range(len(s)+1):\n if s==t:\n ans='Yes'\n break\n s.insert(0,s.pop())\npr...
['Wrong Answer', 'Accepted']
['s378196208', 's207722192']
[3060.0, 3060.0]
[18.0, 17.0]
[159, 146]
p03293
u923270446
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = list(input())\nt = list(input())\nfor i in range(s):\n s.insert(0, s.pop(-1))\n if s == t:\n print("Yes")\nprint("No")', 's = input()\nt = input()\nfor i in range(len(s)):\n s.insert(0, s.pop(-1))\n if s == t:\n print("Yes")\nprint("No")', 's = input()\nt = input()\nfor i in range(s):\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s131101120', 's210305892', 's545035157', 's584070273', 's693095536', 's181733156']
[2940.0, 2940.0, 2940.0, 3060.0, 3060.0, 3068.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 20.0]
[129, 122, 117, 134, 134, 149]
p03293
u923279197
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S = input()\nif S[0] != 'A':\n print('WA')\n exit()\na=0\nfor i in range(2, len(S) - 1):\n if S[i]=='C':\n j=i\n a+=1\nif a!=1:\n print('WA')\n exit()\nfor i in range(len(S)):\n if (i!=0)&(i!=j):\n a=S[i]\n if a.isupper():\n print('WA')\n exit()\npri...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s021056766', 's332742085', 's134196140']
[3064.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[308, 140, 127]
p03293
u924406834
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S = input()\nT = input()\nword = [x for x in T]\nfor i in range(len(word)):\n a = word[0]\n word.append(a)\n word.remove(a)\n if S == word:\n break\n else:\n pass\nif S == word:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nword = [x for x in T]\nfor i in range(le...
['Wrong Answer', 'Accepted']
['s414402220', 's722191559']
[3060.0, 3060.0]
[17.0, 17.0]
[234, 252]
p03293
u937529125
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = input()\nt = input()\nans=0\nfor i in range(0,len(s)):\n a=s[i:]\n b=s[:i]\n ss=a+b\n print(ss)\n if ss == t:\n ans = 1\nif ans == 1:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nans=0\nfor i in range(0,len(s)):\n a=s[i:]\n b=s[:i]\n ss=a+b\n #print(ss)\...
['Wrong Answer', 'Accepted']
['s912950654', 's922201647']
[3060.0, 3060.0]
[17.0, 17.0]
[188, 189]
p03293
u940102677
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = input()\nt = input()\nflag = False\nfor i in range(len(i)):\n if s == t:\n flag = True\n break\n s = s[1:] + s[0]\nprint("Yes" if flag else "No")\n', 's = input()\nt = input()\nflag = False\nfor i in range(len(s)):\n if s == t:\n flag = True\n break\n s = s[1:] + s[0]\nprint("Yes" if flag else "No...
['Runtime Error', 'Accepted']
['s187348466', 's454676816']
[2940.0, 2940.0]
[17.0, 17.0]
[150, 150]
p03293
u941438707
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s=input()\nt=input()\nans=0\nfor i in range(len(s)):\n if t[i:]+t[:i]==s:\n ans=1\n break\nprint("Yes" if ans else "No")\nprint(ans)', 's=input()\nt=input()\nans=0\nfor i in range(len(s)):\n if t[i:]+t[:i]==s:\n ans=1\n break\nprint("Yes" if ans else "No")']
['Wrong Answer', 'Accepted']
['s630403738', 's735418039']
[2940.0, 3060.0]
[17.0, 19.0]
[141, 130]
p03293
u941753895
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["\nS=list(input())\nT=input()\n\n\nS.reverse()\n\n\nS=''.join(S)\n\nif S==T:\n print('Yes')\nelse:\n print('No')", "\nS=input()\nT=input()\n\nfor i in range(len(S)):\n \n S=S[-1]+S[:-1]\n\n \n if S==T:\n print('Yes')\n exit()\n\n\nprint('No')"]
['Wrong Answer', 'Accepted']
['s508626637', 's719875472']
[2940.0, 2940.0]
[17.0, 17.0]
[151, 197]
p03293
u945181840
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S = input()\nT = input()\n\nfor i in range(1, len(S)):\n print(S[-i:] + S[:-i])\n if S[-i:] + S[:-i] == T:\n print('Yes')\n exit()\nprint('No')", "S = input()\nT = input()\n\nfor i in range(len(S)):\n if S[-i:] + S[:-i] == T:\n print('Yes')\n exit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s210314421', 's222197969']
[3060.0, 2940.0]
[17.0, 17.0]
[155, 125]
p03293
u954488273
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['a=list(input())\nb=list(input())\na=a+a\n\nif len(a)!=len(b):\n print("No")\nelse:\n for i in range(len(b)):\n if b==a[i:i+len(b)]:\n print("Yes")\n break\n if i==len(b)-1:\n print("No")', 'a=list(input())\nb=list(input())\na=a+a\n\nif len(a)/2!=len(b):\n print("No"...
['Wrong Answer', 'Accepted']
['s205695438', 's819128151']
[3060.0, 3060.0]
[17.0, 17.0]
[225, 227]
p03293
u962197874
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S = input()\nT = input()\nans = 'No'\nfor i in range(len(S)):\n if S[i:]+S[i] == T:\n ans = 'Yes'\n break\nprint(ans)", "S = input()\nT = input()\nans = 'No'\nfor i in range(len(S)):\n if S[i:]+S[:i] == T:\n ans = 'Yes'\n break\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s685884096', 's370236341']
[2940.0, 2940.0]
[18.0, 18.0]
[117, 118]
p03293
u972416428
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['s = input().strip()\nt = input().strip()\nprint ("Yes" if any(s[i:] + s[:i] == t for i in range(len(s)) else "No")', 's = input().strip()\nt = input().strip()\nprint ("Yes" if any(s[i:] + s[:i] == t for i in range(len(s))) else "No")']
['Runtime Error', 'Accepted']
['s027353900', 's139643481']
[2940.0, 2940.0]
[18.0, 17.0]
[113, 114]
p03293
u978313283
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S=input()\nT=input()\nT+=T\nif S in T:\n print('Yse')\nelse:\n print('No')", "S=input()\nT=input()\nS+=S\nif T in S:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s490683393', 's840501616']
[2940.0, 3064.0]
[18.0, 18.0]
[70, 70]
p03293
u980492406
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["S = list(input())\nT = list(input())\nn = len(S)\nif S == T :\n print('Yes')\nelse :\n for i in range(n-1) :\n a = S[n-1]\n S[1:n] = S[0:n-1]\n S[0] = a\n if S == T :\n print('Yes')\n else :\n print('No')", "S = list(input())\nT = list(input())\nn = len(S)\nif S ...
['Wrong Answer', 'Accepted']
['s985294464', 's741604006']
[3064.0, 3064.0]
[17.0, 18.0]
[246, 264]
p03293
u990849962
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["import sys\n\nS = input()\nT = input()\n\nSc = list(S)\nTc = list(T)\n\nSl = len(Sc)\nnewSc = Sc\n\nfor i in range(Sl):\n newSc = newSc[(Sl - 1):] + newSc[:(Sl - 1)]\n if Tc == newSc:\n print('yes')\n sys.exit()\n\nprint('No')\n", "import sys\n\nS = input()\nT = input()\n\nSc = list(S)\nTc = list(...
['Wrong Answer', 'Accepted']
['s630388091', 's696916104']
[3060.0, 2940.0]
[17.0, 17.0]
[230, 230]
p03293
u993622994
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["s = input()\nt = input()\n\nfor i in range(len(s)):\n if s == t:\n print('Yes')\n break\n else:\n s_last = s[-1]\n s = s_last + s[0:len(s)-1]\n print(s)\nif s != t:\n print('No')", "s = input()\nt = input()\n \nfor i in range(len(s)):\n if s == t:\n print('Yes')\n...
['Wrong Answer', 'Accepted']
['s786192064', 's887732942']
[3060.0, 2940.0]
[17.0, 18.0]
[210, 194]
p03293
u994064513
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
["import sys\n\nS = input()\nT = input()\n\nfor i in range(len(S)):\n s = S[i:] + S[:i]\n if S == T:\n print('Yes')\n sys.exit()\n \nprint('No')", "import sys\n \nS = input()\nT = input()\n \nfor i in range(len(S)):\n s = S[i:] + S[:i]\n if s == T:\n print('Yes')\n sys.exit()\n \nprint('No')"]
['Wrong Answer', 'Accepted']
['s400596583', 's811601362']
[2940.0, 3064.0]
[19.0, 18.0]
[142, 144]
p03293
u999449420
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the l...
['S = input()\nT = input()\nflag = False\nfor i in range(len(S)+1):\n print(S)\n if(S==T):\n print("Yes")\n flag = True\n S = S[-1:] + S[:-1]\nif flag == False:\n print("No")\n', 'S = input()\nT = input()\nsc = S\nflag = False\nfor i in range(len(sc)):\n if(sc==T and flag==False):\n ...
['Wrong Answer', 'Accepted']
['s803039317', 's947484437']
[3060.0, 3060.0]
[20.0, 17.0]
[189, 270]
p03294
u006425112
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import numpy as np\nn = int(input())\nA = list(map(int, input().split()))\n\nprint(A)\nlcm = np.lcm.reduce(A)\nans = ((lcm - 1) % A).sum()\nprint(ans)\n', 'import numpy as np\nn = int(input())\nA = np.array(list(map(int, input().split())))\n\nans = (A-1).sum()\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s158075433', 's058504206']
[14528.0, 12420.0]
[154.0, 154.0]
[144, 112]
p03294
u015993380
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\n\ndef lcm(a,b):\n return a//math.gcd(a,b)*b\n\nn = int(input())\nv = [int(x) for x in input().split()]\nrunning = 1\nfor x in v:\n running = lcm(running,x)\nprint(x-1)', 'def gcd(a,b):\n while b:\n a, b = b,a%b\n return x\n\ndef lcm(a,b):\n return a//gcd(a,b)*b\n\nn = int(input())\nv = [int(x) fo...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s294325237', 's769490392', 's057604868']
[3316.0, 3316.0, 3316.0]
[18.0, 19.0, 18.0]
[172, 209, 111]
p03294
u017810624
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['from fractions import gcd\ndef lcm(x,y):\n return int(x*y/gcd(x,y))\nn=int(input())\na=list(map(int,input().split()))\nfor i in range(1,len(a)):\n if i==1:g=lcm(a[0],a[1])\n else:g=lcm(g,a[i])\nc=0\nfor j in range(len(a)):\n c+=(g-1)%a[j]\nprint(c)', 'print(-int(input())+sum(map(int,input().split())))']
['Runtime Error', 'Accepted']
['s450617438', 's310070615']
[5596.0, 3188.0]
[48.0, 19.0]
[241, 50]
p03294
u024340351
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['a = input(int())\nl = list(map(int, input().split()))\nk = sum(l)-len(l)\nprint(int(k))', 'a = input()\nl = list(map(int, input().split()))\nprint(sum(l)-len(l))']
['Wrong Answer', 'Accepted']
['s532128368', 's338755825']
[3316.0, 3316.0]
[19.0, 18.0]
[84, 68]
p03294
u026788530
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['a = input()\n \nans = 0\na = [int(i) for i in input().split()]\n \nfor num in a:\n ans += num - 1\n \n print(ans)', 'input()\n\nans = 0\na = [int(i) for i in input().split()]\n\nfor num in a:\n ans += num - 1\n \n print(ans)', 'a = input()\n \nans = 0\na = [int(i) for i in input().split()]\n \nfor num in a:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s030552471', 's755127871', 's393922845']
[2940.0, 2940.0, 3316.0]
[17.0, 17.0, 18.0]
[108, 101, 107]
p03294
u030992242
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
["import fractions\n\n\ndef main():\n n = int(input())\n a = list(map(int, input().split()))\n\n lcm_temp = 1\n\n for i in range(n):\n if(a[i] != 0):\n lcm_temp = lcm(lcm_temp, a[i])\n\n print(lcm_temp-1)\n\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef ...
['Wrong Answer', 'Accepted']
['s716625262', 's293520470']
[5340.0, 5688.0]
[109.0, 171.0]
[375, 416]
p03294
u057079894
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\nda=list(map((int,input().split()))\nans=0\nfor i in da:\n ans+=i-1\nprint(ans)\n', 'n=int(input())\nda=list(map((int,input().split()))\nans=0\nfro i in range da:\n ans+=i-1\nprint(ans)', 'n=int(input())\nda=list(map(int,input().split()))\nans=0\nfor i in da:\n ans+=i-1\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s354239517', 's765956790', 's134355019']
[2940.0, 2940.0, 3316.0]
[17.0, 17.0, 18.0]
[91, 96, 90]
p03294
u059628848
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
["input()\na=input().split(' ')\nsum=0\nfor i in a:\n sum+=i-1\nprint(sum)\n", "input()\na=list(map(int,input().split(' ')))\nsum=0\nfor i in a:\n sum+=i-1\nprint(sum)\n"]
['Runtime Error', 'Accepted']
['s284040130', 's998026656']
[3188.0, 3316.0]
[17.0, 18.0]
[71, 86]
p03294
u062691227
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n, aa = [list(map(lambda x:int(x), s.split())) for s in open(0)]\n\nsum(a-1 for a in aa)', 'n, aa = [list(map(lambda x:int(x), s.split())) for s in open(0)]\n\nprint(sum(a-1 for a in aa))']
['Wrong Answer', 'Accepted']
['s538003168', 's483167857']
[9360.0, 9432.0]
[29.0, 27.0]
[86, 93]
p03294
u063073794
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['sal\nn = int(input())\na = list(map(int, input().split()))\nprint(sum(a)-len(a))\n', 'n=int(input())\na=list(map(int,input().split()))\n\nans=0\nfor i in range(n):\n ans+=a[i]-1\nprint(ans)']
['Runtime Error', 'Accepted']
['s605107643', 's699232877']
[2940.0, 3316.0]
[17.0, 18.0]
[78, 98]
p03294
u070200692
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\ns = 0\nx = [s += int(i) for i in input().split()]\nprint(s - n)\n', 'n = int(input())\nx = [int(i) for i in input().split()]\nprint(sum(x) - n)\n']
['Runtime Error', 'Accepted']
['s318359820', 's768372728']
[2940.0, 3316.0]
[17.0, 21.0]
[79, 73]
p03294
u093792099
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\na=[int(i) for i in input().split()]\nl=1\nfor i in range(n):\n l=lcm(a[i],l)\ns=0\nl-=1\nfor i in range(n):\n s+=l%a[i]\nprint(s)', 'def gcd(a,b):\n if b==0:\n return a\n return gcd(b,a%b)\n\ndef lcm(a,b):\n return (a*b)//gcd(a,b)\n\nn=int(input())\na=[int(i) for i in input().spl...
['Runtime Error', 'Accepted']
['s268839743', 's813798567']
[3316.0, 3316.0]
[18.0, 158.0]
[142, 258]
p03294
u099566485
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=input()\na=list(map(int,input().split()))\nprint(sum(a)-n)', 'n=int(input())\na=list(map(int,input().split()))\nprint(sum(a)-n)']
['Runtime Error', 'Accepted']
['s322765169', 's250893319']
[3316.0, 3316.0]
[18.0, 20.0]
[58, 63]
p03294
u106181248
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\nl = list(map(int,input().split()))\nans = 0\n\nfor i in range(10000, 10000000)[::-1]:\n x = 0\n for j in l:\n x += i%j\n if x > ans:\n ans = x\n\nprint(ans)', 'n = int(input())\nli = list(map(int,input().split()))\n\nprint(sum(li)-n)']
['Time Limit Exceeded', 'Accepted']
['s789088846', 's253889905']
[3316.0, 3316.0]
[2104.0, 18.0]
[186, 70]
p03294
u117348081
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = list(map(int, input().split())\nprint(sum(a)-n)', 'n = int(input())\na = list(map(int, input().split()))\nans = sum(a) - n\nprint(ans)']
['Runtime Error', 'Accepted']
['s557152941', 's095781957']
[2940.0, 3316.0]
[17.0, 18.0]
[67, 80]
p03294
u127499732
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['*a, = map(int, input().split())\nprint(sum(a[1:])-a[0])\n', '*a, = map(int, open(0).read().split())\nprint(sum(a[1:])-a[0])\n']
['Wrong Answer', 'Accepted']
['s020342279', 's288640063']
[3316.0, 3316.0]
[21.0, 18.0]
[55, 62]
p03294
u133038626
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N=input()\nprint(sum(map(int, input().split()))-N)', 'N=int(input())\nprint(sum(map(int, input().split()))-N)']
['Runtime Error', 'Accepted']
['s313888484', 's266718537']
[3188.0, 3188.0]
[19.0, 18.0]
[49, 54]
p03294
u133347536
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = list()\nprint(sum(a) - n)\n', 'n = int(input())\na = list(map(int, input().split()))\nprint(sum(a) - n)\n']
['Wrong Answer', 'Accepted']
['s287138024', 's262480708']
[2940.0, 3316.0]
[17.0, 18.0]
[46, 71]
p03294
u136869985
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=input()\nA=list(map(int,input.split()))\nt=sum(A)-1\nans=0\nfor a in A:\n ans += t % a\nprint(ans)\n', 'n=input()\nA=list(map(int,input().split()))\nt=sum(A)-1\nans=0\nfor a in A:\n ans += t % a\nprint(ans)\n', 'print(sum(map(lambda x: x-1, list(map(int,input().split())))))', 'input();print(sum(list(map(lambd...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s060360414', 's654905528', 's655650036', 's573533445']
[2940.0, 3316.0, 3060.0, 3316.0]
[17.0, 19.0, 19.0, 18.0]
[98, 100, 62, 74]
p03294
u151171672
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
["n = int(input())\n\na = [int(x) for x in input().split()]\n\nans = -1\n\nfor i in range(max(a) * 2):\n tmp = 0\n for j in a:\n tmp += i % j\n ans = max(ans, tmp)\n print('i, ans: ', i, ans)\nprint(ans)", 'n = int(input())\na = [int(x) for x in input().split()]\n\nans = sum(a) - n\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s652288667', 's429661440']
[4008.0, 3316.0]
[2104.0, 18.0]
[208, 84]
p03294
u188745744
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['I = int(input())\nB = 0\nfor i in range(I):\n\tA = input()\n B = A - 1 + B\nprint(str(B))', 'I = int(input())\nB = 0\nfor i in range(I):\n\tA = input()\n B = A - 1 + B\nprint(B)', 'I = int(input())\nB = 0\nfor i in range(I):\n\tA = input()\n\tB = A - 1 + B\nprint(str(B))', 'A = int(input())\nlistn = map(int,inp...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s193916893', 's727441891', 's738907389', 's367431643']
[2940.0, 2940.0, 3060.0, 3188.0]
[17.0, 17.0, 17.0, 18.0]
[86, 81, 83, 99]
p03294
u190907730
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\nsum=0\nfor i in range(n):\n sum += int(input())\nprint(sum-n)', 'n = int(input())\na = list(map(int, input().split()))\nprint(sum(a)-n)']
['Runtime Error', 'Accepted']
['s204414057', 's717953572']
[3060.0, 3316.0]
[17.0, 18.0]
[78, 68]
p03294
u197078193
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N,H = map(int,input().split())\nMa = 1\nB = []\nfor i in range(N):\n a,b = map(int,input().split())\n B.append(b)\n if a > Ma:\n Ma = a\nB.sort()\nB.reverse()\ni = 0\nMb = B[0]\nwhile Mb > Ma:\n i += 1\n if i == N:\n Mb = 0\n B = B[:i]\n else:\n Mb = B[i]\nH -= sum(B)\nprint(i+int(-(-H//Ma...
['Runtime Error', 'Runtime Error', 'Accepted']
['s326602323', 's588369045', 's543197936']
[3064.0, 3064.0, 3316.0]
[17.0, 17.0, 18.0]
[301, 258, 70]
p03294
u200030766
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import sys\nimport math\n\ninput = sys.stdin.readline\n\nN=int(input().strip())\ninf=1000000007\n\nans=0\nfor i in range(1,N+1):\n ans+=(i**10-(i-1)**10)*(math.floor(N/i)**10)\nprint(ans%inf)', 'N = int(input())\na=list(map(int, input().strip().split()))\nans=0\nfor i in range(N):\n ans+=a[i]-1\nprint(ans)']
['Wrong Answer', 'Accepted']
['s487556987', 's499346527']
[3060.0, 3316.0]
[21.0, 19.0]
[183, 110]
p03294
u202570162
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['print(-int(input())+sum(int(i) for i in input().split())))', 'print(-int(input())+sum(int(i) for i in input().split()))']
['Runtime Error', 'Accepted']
['s011135954', 's918833351']
[2940.0, 3188.0]
[18.0, 18.0]
[58, 57]
p03294
u210827208
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\n\nX=list(map(int,input()))\n\nprint(sum(X)-n)', 'n=int(input())\n\nX=list(map(int,input().split()))\n\nprint(sum(X)-n)']
['Runtime Error', 'Accepted']
['s390265014', 's696760533']
[3060.0, 3316.0]
[18.0, 19.0]
[57, 65]
p03294
u219607170
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import time\nstart = time.time()\nN = int(input())\nA = list(map(int, input().split()))\nmaxval = 0\nm = 0\nwhile True:\n if m % 1000 == 0:\n if time.time() - start > 1.9:\n break\n print(maxval)\n funcval = 0\n for n in range(N):\n funcval += m % A[n]\n if maxval < funcval:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s101137435', 's924199724', 's530525362']
[6852.0, 3312.0, 3316.0]
[2104.0, 2104.0, 18.0]
[351, 333, 70]
p03294
u224554402
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['\nimport math\nn = int(input())\nans = list(map(int,input().split()))\nlcm = ans[0]\nfor k in ans:\n gcd = math.gcd(lcm, k)\n lcm = round(lcm*k/gcd)\n print(lcm)\n\n\nan =0\nfor k in ans:\n an += (lcm-1)%k\n \nprint(an)', 'n = int(input())\nans = list(map(int,input().split()))\n\nprint(sum(ans)-n)'...
['Runtime Error', 'Accepted']
['s037680549', 's498863291']
[9408.0, 9380.0]
[29.0, 30.0]
[251, 72]
p03294
u235084192
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\nA = list(map(int, input()))\n\nprint(sum(A) - N)', 'N = int(input())\nA = list(map(int, input().split()))\n\nprint(sum(A) - N)']
['Runtime Error', 'Accepted']
['s842360778', 's795338511']
[3060.0, 3316.0]
[17.0, 18.0]
[63, 71]
p03294
u244434589
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\nl = list(map(int, input().split()))\nprint(sum(l) = n)', 'n=int(input())\nl = list(map(int, input().split()))\nprint(sum(l) - n)']
['Runtime Error', 'Accepted']
['s066604437', 's003221741']
[9076.0, 9292.0]
[25.0, 30.0]
[68, 68]
p03294
u259861571
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['#AtCoder\nN = int(input())\na = list(map(int, input()))\n\nprint(sum(a)-N)', '#AtCoder\nN = int(input())\na = list(map(int, input().split()))\n\nprint(sum(a)-N)']
['Runtime Error', 'Accepted']
['s669554177', 's375144421']
[3060.0, 3316.0]
[17.0, 18.0]
[70, 78]
p03294
u268516119
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N=input()\nprint(sum([int(a) for a in input().split()])-N)', 'input()\nprint(sum([int(a)-1 for a in input().split()]))']
['Runtime Error', 'Accepted']
['s859743795', 's831709606']
[3316.0, 3316.0]
[18.0, 18.0]
[57, 55]
p03294
u273010357
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import fractions\nimport functools\nN = int(input())\na = list(map(int, input().split()))\n\ndef lcm(a,b):\n return (a*b)/fractions.gcd(a,b)\n\ndef lcm_list(lst):\n return functools.reduce(lcm,lst)\n\nlcma = lcm_list(a)-1\nres = 0\nfor i in a:\n res += lcma%i\nprint(int(res))', 'from functools import reduce\...
['Time Limit Exceeded', 'Accepted']
['s862203970', 's782533385']
[5368.0, 3936.0]
[2108.0, 670.0]
[270, 995]
p03294
u294385082
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input())-1)\n \nprint(sum(a))', 'n = int(input())\na = list(map(int,input().split()))\nprint(sum(a)-n)']
['Runtime Error', 'Accepted']
['s385292645', 's949638509']
[3060.0, 3316.0]
[18.0, 20.0]
[86, 67]
p03294
u298297089
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['\ndef gcd(x, y):\n\tif y == 0:\n\t\treturn x\n\telse:\n\t\treturn gcd(y, x % y)\n\nN = int(input())\nA = list(map(int, input().split()))\n#N = 7\n#A = [994, 518, 941, 851, 647, 2, 581]\nt = A[0]\nfor i in range(1,N):\n\tif (t % A[i]):\n\t\tcontinue\n\tt = t * A[i] / gcd(t, A[i])\nsum = 0\nt -= 1\nfor i in range(N):\n...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s397704822', 's486284985', 's735755565', 's683678447']
[3316.0, 2940.0, 4104.0, 3316.0]
[21.0, 17.0, 73.0, 18.0]
[322, 321, 275, 75]
p03294
u324549724
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = map(int, input().split())\nprint(sum(a)-len(a))\n', 'n = int(input())\na = list(map(int, input().split()))\nprint(sum(a)-len(a))\n']
['Runtime Error', 'Accepted']
['s770129035', 's269019094']
[3188.0, 3316.0]
[18.0, 18.0]
[68, 74]
p03294
u333945892
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\nprint(sum(map(int,input.split()))-N)', "#a = int(input())\n#b,c = map(int,input().split())\n#s = input()\n#list_s = list(input())\n#list_int = list(map(int,input().split()))\n\n\n#dp = [[0 for i in range(A)] for j in range(B)]\n\n\n\n\n\n\n\n\n#for i,name in enumerate(list)\n\n\n\n\nfrom collections...
['Runtime Error', 'Accepted']
['s004454873', 's363281346']
[2940.0, 3960.0]
[17.0, 162.0]
[53, 1163]
p03294
u347600233
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['from fractions import gcd\ndef lcm(a):\n len_a = len(a)\n ret = a[0]\n for i in range(1, len_a):\n ret = (ret * a[i]) // gcd(ret, a[i])\n return ret\nn = int(input())\na = [int(i) for i in input().split()]\n\ndef f(m):\n sum = 0\n for i in range(n):\n sum += m % a[i]\n return sum\n\...
['Time Limit Exceeded', 'Accepted']
['s298264744', 's776165901']
[5332.0, 3316.0]
[2104.0, 18.0]
[342, 72]
p03294
u350049649
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N=int(input())\nl=list(map(int,input().split()))\nlcm=l[0]\ndef gcd(a,b):\n while b:\n a,b=b,a%b\n return a\n\nfor i in range(1,N):\n lcm=lcm*l[i]//gcd(lcm,l[i])\n\nprint(lcm-1)\n', 'N=int(input())\nl=list(map(int,input().split()))\ng=l[0]\nlcm=l[0]\ndef gcd(a,b):\n while b:\n a,b=b,a%b\n return a\n\nfor i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s457191960', 's475616496', 's615212490']
[3316.0, 3316.0, 3316.0]
[90.0, 27.0, 159.0]
[173, 204, 218]
p03294
u362560965
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\n\n# N = int(input())\n\n\nN =5\na =7, 46, 11, 20, 11\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\nkoubai = 1\nfor i in range(N):\n koubai = lcm(koubai, a[i])\n\nf = [0 for i in range(koubai)]\n\nfor i in range(len(f)):\n ...
['Wrong Answer', 'Accepted']
['s918824629', 's812140938']
[3444.0, 3316.0]
[76.0, 159.0]
[394, 425]
p03294
u375006224
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['a=int(input())\nprint(sum(list(map(int,input())))-a)', 'a=int(input())\nprint(sum(list(map(int,input().split())))-a)\n']
['Runtime Error', 'Accepted']
['s743478488', 's631875752']
[3060.0, 3316.0]
[17.0, 18.0]
[51, 60]
p03294
u375616706
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n, k = map(int, input().split())\na = (list)(map(int, input().split()))\n\n# print(-(-(n-1)//(k-1)))\nprint((n+1 + (k - 2)) // (k-1))\n', 'from functools import reduce\nn = (int)(input())\na = (list)(map(int, input().split()))\n\n\ndef gcd(a, b):\n # a>b\n while(b):\n c = a % b\n a = b\n b = c\n return ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s008945974', 's101290012', 's271212900', 's493779108', 's519319902', 's708567815', 's744865033', 's853921305', 's873823926', 's744640955']
[3188.0, 3812.0, 5628.0, 5992.0, 2940.0, 3812.0, 2940.0, 2940.0, 3812.0, 3812.0]
[20.0, 2104.0, 2104.0, 2104.0, 18.0, 24.0, 18.0, 19.0, 24.0, 24.0]
[130, 364, 167, 167, 123, 443, 122, 124, 225, 225]
p03294
u377989038
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import fractions\n\nn = int(input())\na = list(map(int, input().split()))\n\nlcm = a[0]\nfor i in a:\n lcm = lcm * i / fractions.gcd(lcm, i)\n\nans = 0\nfor i in a:\n ans += (lcm-1) % i\nprint(ans)', 'import fractions\n\nn = int(input())\na = list(map(int, input().split()))\n\nlcm = a[0]\nfor i in a:\n lcm =...
['Wrong Answer', 'Time Limit Exceeded', 'Accepted']
['s874999533', 's925223243', 's123792439']
[5344.0, 5344.0, 3316.0]
[2104.0, 2104.0, 18.0]
[191, 197, 101]
p03294
u384679440
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\nfrom functools import reduce\n\ndef lcm_base(x, y):\n return (x * y) // math.gcd(x, y)\n\ndef lcm_list(a):\n return reduce(lcm_base, a, 1)\n\nN = int(input())\na = list(map(int, input().split()))\nans = 0\nnum = lcm_list(a) - 1\nprint(num)\nfor i in range(len(a)):\n\tans += num % a[i]\nprint(ans)\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s041383134', 's629313069', 's845825772', 's962106350']
[3828.0, 3828.0, 3828.0, 3316.0]
[24.0, 24.0, 24.0, 20.0]
[300, 296, 330, 70]
p03294
u385167811
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\na = input().split(" ")\na = [int(i) for i in a]\nlist = []\nprint(a)\nfor i in range(1000000):\n temp = 0\n for j in range(N):\n temp += i % a[j]\n #print(temp)\n list.append(temp)\n#print(max(list))\n#print(list)', 'N = int(input())\na = input().split(" ")\na = [int(i) for i in a...
['Wrong Answer', 'Accepted']
['s162399618', 's576686847']
[42640.0, 3316.0]
[2104.0, 156.0]
[238, 410]
p03294
u393693918
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
["s = list(input())\nt = list(input())\nans = 0\nfor i in range(len(s)):\n if s == t:\n ans = 1\n break\n a = s[0]\n\n for j in range(len(s)-1):\n s[j] = s[j+1]\n\n s[-1] = a\n\nif ans == 0:\n print('No')\nelse:\n print('Yes')", 'N = int(input())\nA = sum(list(map(int, input().spl...
['Wrong Answer', 'Accepted']
['s144698276', 's175856705']
[3188.0, 3316.0]
[18.0, 18.0]
[246, 70]
p03294
u395620499
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['i = input;i();print(sum([x-1 for x in i().split()]))', 'n,a=open(0);print(sum(map(int,a.split()))-int(n))']
['Runtime Error', 'Accepted']
['s816906738', 's039762143']
[9236.0, 9308.0]
[27.0, 29.0]
[52, 49]
p03294
u412481017
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\nr=sorted(map(int,input().split()))[::-1]\nprint(r)\n\n', 'int(input())\nprint(-1*int(input())+sum(list(map(int,input().split()))))\n', 'print(-int(input())+sum(list(map(int,input().split()))))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s090322489', 's327603016', 's954083419']
[3316.0, 3060.0, 3316.0]
[19.0, 18.0, 18.0]
[66, 72, 56]
p03294
u413318755
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input().split())\nAN = map(int, input().split())\n\nprint(sum(AN)-N)', 'N = int(input().split())\nAN = list(map(int, input().split()))\n \nprint(sum(AN)-N)', 'N = int(input())\nAN = map(int, input().split())\n \nprint(sum(AN)-N)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s479305202', 's487566931', 's033140605']
[2940.0, 3060.0, 3188.0]
[17.0, 17.0, 17.0]
[73, 80, 66]
p03294
u418527037
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\n\na = list(map(int, input().split()))\n\nb = a\n\nans = 0\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\ndef lcm_list(l):\n for i in range(len(l)):\n if i == len(l) - 1:\n break\n l[i+1] = lcm(l[i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s119313728', 's659537998', 's178399837']
[14384.0, 15792.0, 3316.0]
[2104.0, 2108.0, 18.0]
[410, 403, 70]
p03294
u430223993
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import fractions\nimport numpy as np\nn = int(input())\na = np.array([int(i) for i in input().split()])\nlcm = a[0]\nfor i in a:\n lcm = int(lcm * i / fractions.gcd(lcm, i))\nx = lcm - 1\nx = np.ones(n) * x\nprint(int(np.sum(x % a)))', 'n = int(input())\na = [int(i) - 1 for i in input().split()]\nprint(sum(a))']
['Wrong Answer', 'Accepted']
['s425240203', 's494949257']
[13608.0, 3316.0]
[185.0, 18.0]
[227, 72]
p03294
u443569380
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\nL = [int(i) for i in input().split()]\nprint(sum(L - N) )', 'N = int(input())\nL = [int(i) - 1 for i in input().split()]\nprint(sum(L))']
['Runtime Error', 'Accepted']
['s100035856', 's827618062']
[3316.0, 3316.0]
[19.0, 18.0]
[73, 72]
p03294
u445619807
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['def main():\n run()\n\ndef run():\n n = int(input())\n data = [int(x) for x in input().split(" ")]\n\n max_sum = -1\n max_m = max(data)\n for m in range(max_m):\n max_sum = max(max_sum, calc(m, data))\n print(max_sum)\n\n\ndef calc(m, numbers):\n ...
['Wrong Answer', 'Accepted']
['s190225195', 's982414491']
[3316.0, 3316.0]
[2104.0, 19.0]
[436, 293]
p03294
u454714837
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\nfrom functools import reduce\n\nN = int(input())\nA= list(map(int,input().split( )))\n\ndef gcd(x,y):\n if x > y:\n x , y = y , x\n while x>0:\n x, y = y%x , x\n return y\n \ndef lcm_base(x, y):\n return (x * y) // gcd(x, y)\n\ndef lcm_list(numbers):\n return reduce(lcm_ba...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s628787154', 's674526101', 's993349321', 's403286463']
[3824.0, 5340.0, 5340.0, 3824.0]
[162.0, 36.0, 37.0, 160.0]
[405, 332, 331, 396]
p03294
u466917094
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['a=input()\nb=input()\nz=len(a)\nfor i in range(0,z):\n if a==b[i:]+b[:i] : \n print("Yes")\n exit(0)\nprint("No")', 'n=input()\nprint(sum([int(j) for j in input().split()])-n)', 'n=int(input())\nprint(sum([int(j) for j in input().split()])-n)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s354859547', 's976453076', 's887577211']
[3060.0, 3316.0, 3316.0]
[17.0, 18.0, 18.0]
[113, 57, 62]
p03294
u488178971
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\nfrom functools import reduce\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\nN=int(input())\nA = [int(j) for j in input().split()]\n\nprint(lcm(*A)-1)', '#ABC 103\nimport math\nfrom functools import reduce\n\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\nN=int(input())\nA =...
['Runtime Error', 'Runtime Error', 'Accepted']
['s778473580', 's786978576', 's526575643']
[3956.0, 3828.0, 3812.0]
[25.0, 24.0, 100.0]
[171, 217, 191]
p03294
u496344397
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['# -*- coding: utf-8 -*-\n\nimport functools\nimport fractions \n\nN = int(input())\nnumbers = list(map(int, input().split()))\n\nmax_under_lcm = functools.reduce(lambda x, y: int((x * y) / fractions.gcd(x,y)), numbers) - 1\nanswer = sum([max_under_lcm % n for n in numbers])\n\nprint(answer)', '# -*- coding: utf-8 -*-...
['Runtime Error', 'Runtime Error', 'Accepted']
['s183650247', 's490263183', 's843119172']
[5508.0, 3064.0, 5340.0]
[45.0, 17.0, 37.0]
[280, 382, 147]
p03294
u514383727
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = []\nfor i in range(n):\n a.append(int(input()))\nprint(sum(a) - len(a))', 'n = int(input())\na = list(map(int, input().split()))\n\nres = sum([i-1 for i in a])\nprint(res)\n']
['Runtime Error', 'Accepted']
['s482341215', 's762992424']
[3060.0, 3316.0]
[19.0, 19.0]
[90, 93]
p03294
u514401521
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['from functools import reduce\nn = int(input())\na = list(map(int, input().split()))\n\ndef gcd(x, y):\n try:\n if y == 0:\n return x\n return gcd(y, x % y)\n \n\ndef gcd2(number):\n return reduce(gcd, number)\n\ndef lcm(x, y):\n return x * y // gcd(x, y)\ndef lcm2(number):\n return reduce(...
['Runtime Error', 'Accepted']
['s987203252', 's954289294']
[2940.0, 3808.0]
[17.0, 162.0]
[398, 389]
p03294
u516291518
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import functools\n\ndef gcd(a,b):\n while b > 0:\n a, b = b, a % b\n return a\n \ndef lcm(a, b):\n return a * b / gcd(a, b)\n\nN = int(input())\na = list(map(int, input().split()))\nassert(len(a) == N)\n\nlcmVal = int(functools.reduce(lcm, a))\nprint(lcmVal)\nprint(sum(map(lambda x: (lcmVal-1) % x,...
['Runtime Error', 'Accepted']
['s135632495', 's479228708']
[3828.0, 3812.0]
[106.0, 59.0]
[308, 277]
p03294
u517910772
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = input()\nlst = list(map(int, input().split()))\nprint(len(lst)+sum(lst))\n', 'n = input()\nlst = list(map(int, input().split()))\nprint(sum(lst) - len(lst))\n']
['Wrong Answer', 'Accepted']
['s158084602', 's687898749']
[3316.0, 3316.0]
[17.0, 18.0]
[75, 77]
p03294
u518042385
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n=int(input())\nl=list(map(int,input().split()))\nnm=max(l)\nl1=[]\nfor i in range(1,nm+1):\n s=0\n for j in l:\n s+=i%j\n l1.append(s)\nprint(max(l1))\n \n ', 'n=int(input())\nl=list(map(int,input().split()))\ns=0\nfor i in l:\n s+=i-1\nprint(s)']
['Wrong Answer', 'Accepted']
['s227014173', 's656656052']
[4660.0, 3316.0]
[2107.0, 18.0]
[154, 81]
p03294
u527261492
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import fractions\nfrom functools import reduce\nn=int(input())\na=list(map(int,input().split()))\ndef gcd(*numbers):\n return reduce(fractions.gcd,numbers)\ng=gcd(*a)\nm=1\nfor i in range(n):\n m*=a[i]\nl=m//g\nprint(l+1)\n \n', 'import numpy as np\nn=int(input())\na=list(map(int,input().split()))\nA=np.array(a)\n...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s076960055', 's242376403', 's333167868', 's699827799', 's825887087', 's351225450']
[5348.0, 12488.0, 5304.0, 3316.0, 14532.0, 3316.0]
[44.0, 150.0, 36.0, 25.0, 150.0, 18.0]
[216, 154, 138, 98, 148, 97]
p03294
u533084327
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import numpy as np\nN = int(input())\na = list(map(int,input().split()))\na = np.array(a)\na = np.sort(a)[::-1]\nMAX = np.abs(np.prod(a))\nsum = 0\nmax = np.sum(a)-len(a)\nn = a[0]-1\nwhile True:\n st = np.sum(n%a)\n if sum < st:\n sum = st\n if sum == max:\n break\n ind = np.where(a - n%a =...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s426957890', 's925495271', 's991391195', 's610685242']
[14552.0, 21292.0, 21524.0, 20636.0]
[2108.0, 2108.0, 2109.0, 305.0]
[421, 470, 461, 95]
p03294
u535423069
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import sys\n\nstdin = sys.stdin\n\nmod = 1000000007\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline().rstrip()\nnas = lambda: stdin.readline().split()\n\ndef gcd(m, n):\n\tif n == 0:\n\t\treturn m\n\treturn gcd(n, m % n)\n\ndef lcm(m, n):\n\treturn m * n /...
['Runtime Error', 'Accepted']
['s601419303', 's190705200']
[3064.0, 3316.0]
[17.0, 156.0]
[436, 438]
p03294
u536113865
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['N = int(input())\na = list(map(int, input().split()))\n\nf = sum(a)-N\nprint(a)', 'N = int(input())\na = list(map(int, input().split()))\n\nf = sum(a)-N\nprint(f)']
['Wrong Answer', 'Accepted']
['s632014792', 's596074542']
[3316.0, 3316.0]
[18.0, 18.0]
[75, 75]
p03294
u537497369
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['number_int = input()\nlist_int = list(map(int,input().split()))\n\nprint(sum(list_int)-number_int)\n', 'number_int = input()\nlist_int = list(map(int,input().split()))\n\nprint(str(sum(list_int) - int(number_int)))']
['Runtime Error', 'Accepted']
['s803426718', 's516871553']
[3316.0, 3316.0]
[18.0, 18.0]
[96, 107]
p03294
u548624367
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['print((lambda a,b:sum(b)-a)(input(),list(map(int,input().split()))))', 'print(-int(input())+sum(list(map(int,input().split()))))']
['Runtime Error', 'Accepted']
['s466735733', 's920502768']
[3316.0, 3316.0]
[18.0, 18.0]
[68, 56]
p03294
u553055160
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['import math\n\nline = input()\nwords = line.split()\nnum_list = []\nfor word in words:\n num_list.append(int(word))\nans = 0\ntemp = 0\n\nfor i, num in enumerate(num_list):\n if i+1 < len(num_list) -1:\n break\n temp = math.gcd(num, num_list[i + 1])\n\n\nfor num in num_list:\n ans += (temp-1) % num...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s131997331', 's542908352', 's569303785', 's720820213']
[3064.0, 3060.0, 3060.0, 3316.0]
[17.0, 17.0, 17.0, 19.0]
[313, 157, 157, 178]
p03294
u569970656
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['n = int(input())\na = [int(input()) - 1 for _ in range(n)]\nprint(sum(a))', 'a = list(map(int,input().split()))\nprint(sum(a) - len(a))', 'n=int(input())\na=[int(x) for x in input().split()]\nprint(sum([(ai-1)%ai for ai in a]))\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s122637743', 's690415850', 's612720869']
[3060.0, 3060.0, 3316.0]
[17.0, 17.0, 18.0]
[71, 57, 87]
p03294
u576432509
2,000
1,048,576
You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N). Here, X\ mod\ Y denotes the remainder of the division of X by Y. Find the maximum value of f.
['from fractions import gcd\n\nn=int(input())\na=list(map(int,input().split()))\n\nagcd=gcd(a[0],a[1])\nalcm=a[0]*a[1]//agcd\nfor i in range(n-2):\n agcd=gcd(alcm,a[i+2])\n alcm=alcm*a[i+2]//agcd\n \n#print(alcm)\n \nif 1==1:\n fmax=0\n for i in range(alcm):\n f=0\n for j in range(n):\n ...
['Time Limit Exceeded', 'Accepted']
['s158985694', 's677423756']
[5348.0, 3316.0]
[2104.0, 18.0]
[377, 99]