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
p03328
u546853743
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nk = b-a\nal = (1+k)*k / 2\nprint(al-b)', 'a,b=map(int,input().split())\nk = b-a\nal = 0\nfor i in range(k):\n al += i\nprint(al-b)', '\na,b=map(int,input().split())\nk = b-a\nal = 0\nfor i in range(k):\n al += i\nprint(b-al)', 'a,b=map(int,input().split())\nk = b-a\nal = (1+k)*k\na...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s404759308', 's501241014', 's883749522', 's652003053']
[9160.0, 9016.0, 8960.0, 9084.0]
[29.0, 28.0, 27.0, 27.0]
[65, 86, 87, 70]
p03328
u551692187
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int, input().split())\nprint(b - sum(range(b - a + 1)))\n', 'a,b = map(int, input().split())\nprint(sum(range(b - a + 1)) - b)\n']
['Wrong Answer', 'Accepted']
['s605079867', 's356657853']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 65]
p03328
u556589653
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['N = int(input())\nnow = 0\nans = 0\nfor i in range(1,N+1):\n if i%2 == 0:\n continue\n else:\n for j in range(1,i+1):\n if i%j == 0:\n now += 1\n if now == 8:\n ans += 1\n now = 0\nprint(ans)', 'a,b = map(int,input().split())\nx = 1\ny = 3\nfor i ...
['Runtime Error', 'Accepted']
['s575368965', 's918650779']
[3060.0, 3064.0]
[17.0, 18.0]
[249, 161]
p03328
u559823804
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nn=b-a\nsumn=n*(1+n)//2\nprint(sumn)\n\nprint(sumn-b)\n', 'a,b=map(int,input().split())\nn=b-a\nsumn=(n*(n+1))//2\n\nprint(sumn-b)\n']
['Wrong Answer', 'Accepted']
['s763443705', 's702432081']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 68]
p03328
u578501242
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['10 11a = [int(i) for i in input().split()]\nb=a[0]\nc=a[1]\nx=c-b\nprint(round((x+1)*x/2)-c)', 'a = [int(i) for i in input().split()]\nb=a[0]\nc=a[1]\nx=c-b\nprint(round((x+1)*x/2)-c)']
['Runtime Error', 'Accepted']
['s387165270', 's661604057']
[2940.0, 2940.0]
[17.0, 17.0]
[88, 83]
p03328
u583010173
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = [int(x) for x in input().split()]\nn = b - a\nwa = sum(range(n))\nprint(wa - b)', 'a, b = [int(x) for x in input().split()]\nn = b - a\nwa = sum(range(n+1))\nprint(wa - b)']
['Wrong Answer', 'Accepted']
['s951575292', 's658237497']
[3064.0, 2940.0]
[17.0, 17.0]
[83, 85]
p03328
u589726284
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\ndp = []\ndp[0] = 1\ndp[1] = 2\nfor i in range(1000):\n dp[i] = dp[0] + dp[1+i]\n print(dp[i])', 'a, b = map(int, input().split())\nprint(round((b-a)*(b-a+1)/2-b))\n']
['Runtime Error', 'Accepted']
['s518747592', 's554719044']
[2940.0, 3060.0]
[17.0, 18.0]
[123, 65]
p03328
u594956556
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nc=b-a\nx=c*(c+1)/2 - b\nprint(str(x))', 'a,b=map(int,input().split())\nc=b-a\nx=c*(c+1)/2 - b\nprint(x)\n', 'a,b=map(int,input().split())\nc=b-a\ny=0\nfor i in range(b-a):\n y+=i\nx=y-a\nprint(x)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s272240356', 's820416453', 's068728220']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[64, 60, 82]
p03328
u598009172
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=(int(i) for i in input().split())\nc = b-a\n\nfor s in range(c):\n sum += s+1\n\nprint(sum-b)', 'a,b=(int(i) for i in input().split())\nc = b - a\nzako = 0\nfor d in range(c):\n zako += d + 1\nprint(zako-b)']
['Runtime Error', 'Accepted']
['s312825362', 's871272553']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 107]
p03328
u602677143
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nls = [1]\nfor i in range(999):\n ls.append(ls[i]+i+2)\nfor i in range(len(ls)):\n if ls[i] > a:\n print(abs(ls[i+1]-a))\n break', 'a,b = map(int,input().split())\nls = [1]\nfor i in range(999):\n ls.append(ls[i]+i+2)\nfor i in range(len(ls)):\n if ls[i] > a:\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s457823109', 's860113647', 's040168799']
[3060.0, 3060.0, 3060.0]
[17.0, 20.0, 18.0]
[172, 172, 180]
p03328
u602802430
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['# coding:utf-8\na, b= map(int, input().split())\n\ndiff = b-a\nd = 0\nfor i in enumerate(diff+1, 1):\n d += i \n\nprint(abs(d-a)\n \n', '# coding:utf-8\na, b= map(int, input().split())\n\ndiff = b-a\nd = 0\nfor i in range(1, diff):\n d += int(i)\n\nprint (d)\nprint(abs(d-a))', '# coding:utf-8\na, b= map(int,...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s352497583', 's850141051', 's188924397']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[129, 132, 121]
p03328
u619458041
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
["import sys\n\ndef main():\n input = sys.stdin.readline\n a, b = map(int, input().split())\n diff = b - a\n ah = sum([a for a in range(1, diff+1)])\n print(ah-a)\n\n\nif __name__ == '__main__':\n main()", "import sys\n\ndef main():\n input = sys.stdin.readline\n a, b = map(int, input().split())\n diff = b - a...
['Wrong Answer', 'Accepted']
['s754446865', 's013789140']
[3060.0, 3060.0]
[18.0, 17.0]
[196, 194]
p03328
u620480037
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['\nN=int(input())\n\nif N>=1000:\n print("ABD")\nelse:\n print("ABC")', 'a,b=map(int,input().split())\nN=b-a\nsekisetu=0\nfor i in range(N+1):\n sekisetu+=i\nprint(sekisetu-b)']
['Runtime Error', 'Accepted']
['s327566916', 's121354719']
[2940.0, 2940.0]
[18.0, 17.0]
[68, 100]
p03328
u625963200
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\n\nprint((b-a)*(b-a+1)/2-b)', 'a,b=map(int,input().split())\n\nprint(int((b-a)*(b-a+1)/2-b))']
['Wrong Answer', 'Accepted']
['s924360131', 's010900827']
[3188.0, 2940.0]
[18.0, 17.0]
[54, 59]
p03328
u626228246
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nsum = 0\nfor i in range(1,1000):\n if a > sum:\n sum += i\n else:\n print(sum - a)', 'import sys\na,b = map(int,input().split())\nsum = 0\nfor i in range(1,1000):\nwhile(a > sum):\n\ti = 1\n sum += 1\n i += 1\nprint(sum-a)\n\n', 'a,b = map(int,input().split())\nans = 0\nN...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s579698469', 's730992679', 's196828031']
[9156.0, 8876.0, 9160.0]
[32.0, 28.0, 23.0]
[116, 135, 98]
p03328
u627417051
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = list(map(int, input()))\nanswer = (b - a) * (b - a + 1) / 2 - b\nprint(int(answer))\n', 'a, b = list(map(int, input().split()))\nanswer = (b - a) * (b - a + 1) / 2 - b\nprint(int(answer))\n']
['Runtime Error', 'Accepted']
['s337385384', 's402241484']
[2940.0, 2940.0]
[17.0, 18.0]
[89, 97]
p03328
u642823003
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\ntower = []\ntmp = 0\n\nfor i in range(1, 1000):\n tmp += 1\n tower.append(tmp)\n \ncount = a - b\n\nprint(tower[count - 1] - b)', 'a, b = map(int, input().split())\ntower = []\ntmp = 0\n\nfor i in range(1, 1000):\n tmp += 1\n tower.append(tmp)\n \ncount = b - a\n\np...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s372395354', 's484667945', 's932606162', 's777013369']
[3064.0, 2940.0, 2940.0, 3060.0]
[19.0, 17.0, 17.0, 17.0]
[162, 163, 163, 161]
p03328
u652656291
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nn =\u3000b-a\nprint(n*(n+1)/2-b)\n', 'a,b = map(int,input().split())\nfor i in range (1,1000):\n n = i(i+1)//2\n if b - a == i:\n print(n-a)\n ', 'a,b = map(int,input().split())\nn = b-a\ntower = ((n+1)*n)/2\nprint(tower-b)\n', 'a,b = map(int,input().split())\nn =\u3000b-a\nprint...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s069606844', 's199606611', 's544054749', 's864676965', 's697345476']
[3064.0, 2940.0, 2940.0, 3188.0, 2940.0]
[19.0, 18.0, 17.0, 18.0, 17.0]
[60, 106, 74, 61, 79]
p03328
u657913472
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split());print((b-a)**2-a-b)', 'a,b=map(int,input().split());a-=b;print(~-a*a//2-b)']
['Wrong Answer', 'Accepted']
['s795219525', 's330754662']
[2940.0, 2940.0]
[18.0, 18.0]
[48, 51]
p03328
u659100741
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['package main\n\nimport (\n "fmt"\n "math/rand"\n "time"\n)\n\nfunc swap(data []float64, i,', 'a, b = map(int, input().split())\n\nnum = b - a\nh = 0\nfor i in range(num):\n h += i\n\nprint(h-a)']
['Runtime Error', 'Accepted']
['s501159376', 's687042813']
[2940.0, 2940.0]
[20.0, 17.0]
[91, 95]
p03328
u659640418
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int, input().split())\nprint(b*(b+1)/2-b)', 'a,b=map(int, input().split())\nprint(b*(b+1)/2-(b-a))', 'a,b=map(int, input().split())\nprint(sum([1:b])-(b-a))', 'a,b=map(int, input().split())\nprint(int((b-a)*(b-a+1)/2-b))']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s155052050', 's175049707', 's264807561', 's719689587']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[48, 52, 53, 59]
p03328
u663014688
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['def delta2lower_height(arg_num):\n height = 0\n for i in range(1, arg_num):\n height += i\n return height\n\ninput_line = input().split()\n\nhigher_margin = int(input_line[0])\nlower_margin = int(input_line[1])\n\ndelta = higher_margin - lower_margin\n\nlower_height = delta2lower_height(delta)\nsnow_h...
['Wrong Answer', 'Accepted']
['s554664751', 's934292021']
[3060.0, 2940.0]
[17.0, 17.0]
[364, 317]
p03328
u673173160
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nh = 0\nfor i in range(1, 1000):\n h += i\n ans = (2*h + i+1 - a - b)/2\n if ans > 0:\n print(ans)\n exit()', 'a, b = map(int, input().split())\nn = b-a-1\nh = 0\nfor i in range(1, n+1):\n h += i\n#print(h)\nprint(h-a)']
['Wrong Answer', 'Accepted']
['s971920121', 's170546309']
[3068.0, 9016.0]
[18.0, 28.0]
[156, 104]
p03328
u682985065
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\ntower = [n*(2+(i-1))/2 for i in range(1, 1000)]\n\nfor i in range(999):\n if b - a == tower[i+1] - tower[i]:\n print(a-tower[i])\n break\n', 'a, b = map(int, input().split())\ntower = [i*(2+(i-1))/2 for i in range(1, 1000)]\n\nfor i in range(999):\n if a - tower[i] == b - t...
['Runtime Error', 'Accepted']
['s756899821', 's645329355']
[2940.0, 3060.0]
[17.0, 17.0]
[172, 191]
p03328
u684026548
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['n = int(input())\ns = input()\n\nmax_n = 0\n\nfor i in range(1,n):\n x = set()\n y = set()\n for j in range(0,i):\n x.add(s[j])\n for j in range(i,n):\n y.add(s[j])\n\n if len(x|y) > max_n:\n max_n = len(x|y)\n\nprint(max_n)\n\n', 'a, b = map(int, input().split())\n\nk = b - a - 1\...
['Runtime Error', 'Accepted']
['s418727125', 's042738060']
[3060.0, 2940.0]
[17.0, 17.0]
[246, 112]
p03328
u686036872
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = int(input())\n \nprint((b-a)*(b-a+1)//2-b)', 'a, b = map(int, input().split())\n \nprint((b-a)*(b-a+1)//2-b)']
['Runtime Error', 'Accepted']
['s958755962', 's562365395']
[2940.0, 2940.0]
[17.0, 17.0]
[58, 71]
p03328
u690037900
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['ans=0\na,b=map(int,input().split())\nfor i in range(1,999):\n ans+=i\n if ans>b:\n print(ans-a)\n exit(0)', 'a,b=map(int,input().split())\nprint(((a-b)**2-a-b)//2)']
['Wrong Answer', 'Accepted']
['s529361452', 's440024157']
[2940.0, 2940.0]
[18.0, 17.0]
[119, 53]
p03328
u691018832
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
["a, b = map(int, input().split())\nc = [0]\nfor i in range(1, 1000):\n c.append(c[i-1]+i)\n print(c[i-1], end=' ')\n if c[i-1]-a > 0:\n ans = c[i-1]-a\n if a+ans == c[i-1] and b+ans == c[i]:\n break\n else:\n ans = 0\nprint(ans)\n", 'a, b = map(int, input().split())\...
['Wrong Answer', 'Accepted']
['s395635545', 's735943827']
[3188.0, 3060.0]
[19.0, 18.0]
[269, 242]
p03328
u692632484
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['tall=[int(i) for i in input().split()]\ndist=tall[1]-tall[0]\n\nleft=0\nfor i in range(dist):\n left+=i\nprint(left-tall[0],end=" ")\nprint(left+dist-tall[1])', 'tall=[int(i) for i in input().split()]\ndist=tall[1]-tall[0]\n\nleft=0\nfor i in range(dist):\n left+=i\nprint(left-tall[0])']
['Wrong Answer', 'Accepted']
['s748587521', 's159590938']
[3060.0, 3060.0]
[17.0, 20.0]
[152, 119]
p03328
u696684809
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nc = b-a\nwa = c*(c+1)//2\nprint(b-wa)', 'a,b = map(int,input().split())\nc = b-a\nwa = c*(c+1)//2\nprint(wa-b)\n']
['Wrong Answer', 'Accepted']
['s918207639', 's308210855']
[8980.0, 9092.0]
[29.0, 27.0]
[66, 67]
p03328
u698479721
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b= map(int, input().split())\nc = b-a\nn = c*(c+1)/2\nans = n-b\nprint(ans)', 'a, b= map(int, input().split())\nc = b-a\nn = c*(c+1)/2\nans = n-b\nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s075545110', 's229237347']
[2940.0, 2940.0]
[19.0, 17.0]
[74, 79]
p03328
u703890795
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nc = b-a\n\nh = c(c+1)//2\nprint(h-b)', 'a, b = map(int, input().split())\nc = b-a\n\nh = c*(c+1)//2\nprint(h-b)']
['Runtime Error', 'Accepted']
['s748903463', 's583932922']
[2940.0, 2940.0]
[17.0, 18.0]
[132, 133]
p03328
u704521025
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
["if int(input()) < 1000:\n print('ABC')\nelse:\n print('ABD')\n", 'a, b = map(int, input().split())\nn = b-a \nhidari = n*(n-1) / 2 \nans = hidari - a\nprint(int(ans))\n']
['Runtime Error', 'Accepted']
['s676143810', 's696759587']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 159]
p03328
u732870425
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nans = 0\nfor i in range(b-a):\n ans += i\nprint(ans)', 'a, b = map(int, input().split())\nans = 0\nfor i in range(b-a):\n ans += i\nprint(ans - a)']
['Wrong Answer', 'Accepted']
['s183569199', 's983892884']
[2940.0, 2940.0]
[17.0, 17.0]
[85, 89]
p03328
u733925602
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['#Stone Monument\na,b = map(int, input().split())\nM = []\nans = []\nfor i in range(1,1000,1):\n\tn = 1/2*i*(i+1)\n\tM.append(n)\nfor i in range(0,999,1):\n\tfor j in range(0,1/2*i*(i+1),1):\n\t\tif (a + j == M[i]) and (b + j == M[i+1]):\n\t\t\tans.append(j)\n\nprint(min(ans))', '#Stone Monument\na,b = map(int, input(...
['Runtime Error', 'Accepted']
['s905299488', 's076330186']
[3064.0, 3060.0]
[18.0, 17.0]
[256, 141]
p03328
u749643742
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = int(input())\nz =[]\n\nc = 0\nfor i in 999:\n c +=i\n z.append(c)\n\nw =max(a,b)-min(a,b)\nif (w==z[i+1]-z[i]):\n print(z[i]-a)', 'a,b = map(int,input().split)\nz =[]\n\nc = 0\nfor i in 999:\n c +=i\n z.append(c)\n\nw =max(a,b)-min(a,b)\nif (w==z[i+1]-z[i]):\n print(z[i]-a)\n', 'a, b = map(int, input().sp...
['Runtime Error', 'Runtime Error', 'Accepted']
['s737879026', 's826755970', 's019478709']
[3060.0, 3060.0, 2940.0]
[18.0, 17.0, 17.0]
[126, 137, 100]
p03328
u757274384
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nn = b-a\n\nprint(n*(n+1)/2 - b)', 'a,b = map(int,input().split())\nn = b-a\n\nprint(int(n*(n+1)/2) - b)\n']
['Wrong Answer', 'Accepted']
['s047249168', 's160743541']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 66]
p03328
u766393261
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nN=b-a\nprint(sum(list(range(1,N))))', 'a,b=map(int,input().split())\nN=b-a\nprint(sum(list(range(1,N+1))))', 'a,b=map(int,input().split())\nN=b-a\nprint(sum(list(range(1,N+1)))-b)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s423630152', 's609824232', 's636371356']
[3060.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0]
[63, 65, 67]
p03328
u766407523
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nprint(sum(range(b-a)-a))', 'a, b = map(int, input().split())\nprint(sum(range(b-a)-a)', 'a, b = map(int, input().split())\nprint(sum(range(b-a))-a)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s302691452', 's982560883', 's180187779']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[57, 56, 57]
p03328
u767995501
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nprint(((a-b)*(a-b)-(a+b))/2)', 'import math\n\na, b = map(int, input().split())\nprint(math.floor(((a-b)*(a-b)-(a+b))/2))']
['Wrong Answer', 'Accepted']
['s570302469', 's628901113']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 86]
p03328
u777394984
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\ns = a-b\nm = int(s*(s+1)/2)\nprint(m-b)', 'a,b = map(int,input().split())\nprint(int(b-a*(b-a+1)/2)-b)\n', 'a,b = map(int,input().split())\nprint(int((b-a)*(b-a+1)/2)-b)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s362503236', 's848775951', 's735626260']
[3316.0, 2940.0, 2940.0]
[20.0, 17.0, 17.0]
[68, 59, 61]
p03328
u780698286
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['import itertools\n\nn, m = map(int, input().split())\nl = itertools.accumulate([1] * 999)\nprint(l[m-n-1] - m)', 'import itertools\n\nn, m = map(int, input().split())\nl = list(itertools.accumulate(range(1, 1000)))\nprint(l[m-n-1]-m)']
['Runtime Error', 'Accepted']
['s030983754', 's290430118']
[9124.0, 9016.0]
[25.0, 27.0]
[106, 115]
p03328
u790301364
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['def main2():\n strbuf = input("");\n strbufs = strbuf.split();\n buf = [];\n for i in range(2):\n buf.append(int(strbufs[i]));\n sa = buf[1] - buf[0];\n takasa = sa * (sa + 1) / 2;\n result = takasa - buf[1];\n print(result);\n\n\nif __name__ == \'__main__\':\n main2()', 'def main2()...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s297008829', 's787679758', 's633598468']
[3060.0, 3064.0, 3060.0]
[17.0, 18.0, 17.0]
[288, 300, 293]
p03328
u795630164
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\n\ndef calc(n):\n count = 0\n for i in range(1, n+1):\n count += i\n reversed(count)\n\nprint(calc(b - a) - b)', 'import sys\nsys.setrecursionlimit(100000)\na, b = map(int, input().split())\n\ndef calc(n):\n if n == 1:\n return 1\n else:\n return ca...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s060214471', 's327667334', 's881499653']
[2940.0, 4044.0, 2940.0]
[18.0, 115.0, 17.0]
[151, 231, 148]
p03328
u798316285
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nn=b-a\nprint(n(n+1)//2-b)', 'a,b=map(int,input().split())\nn=b-a\nprint(n*(n+1)//2-b)']
['Runtime Error', 'Accepted']
['s773688126', 's241465080']
[3060.0, 2940.0]
[18.0, 17.0]
[53, 54]
p03328
u806403461
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\n\nprint((b-a)*(b-a + 1)/2 - b)\n', 'a, b = map(int, input().split())\n\nprint(int((b-a)*(b-a + 1)/2 - b))\n']
['Wrong Answer', 'Accepted']
['s387776004', 's848397791']
[2940.0, 2940.0]
[17.0, 18.0]
[63, 68]
p03328
u812958204
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nb_index = b-a\na_index = b_index - 1\nget_height = lambda n: n*(n+1)/2\n\na_height = get_height(a_index)\nb_height = get_height(b_index)\nsnow_height = b_height - b\nprint(snow_height)', 'a, b = map(int, input().split())\nb_index = b-a\na_index = b_index - 1\nget_height = lambda n: n...
['Wrong Answer', 'Accepted']
['s470516673', 's246549037']
[2940.0, 3060.0]
[17.0, 17.0]
[210, 215]
p03328
u824132304
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nsum=0\ncnt=0\nwhile(cnt<b-a):\n cnt+=1\n l+=cnt\nprint(l-b)', 'a=int(input())\nb=int(input())\nprint((b-a-1)*(b-a)//2-a)', 'a=int(input())\nb=int(input())\nprint((b-a-1)*(b-a)//2-a)', 'a,b=map(int,input().split())\nprint((b-a-1)*(b-a)/2-a)', 'a,b = map(int,input().split())\nsum=0...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s111070665', 's753147162', 's779374289', 's932623568', 's967458748']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 18.0]
[91, 55, 55, 53, 95]
p03328
u827202523
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['N = input()\nN = N.split(" ")\nN = [int(i) for i in N]\n\nsub = N[1] - N[0]\nhigh = 0 \nfor i in range(sub):\n high += i\n\nprint(high)\n\nsnow = high - N[0]\nprint(snow)', 'N = input()\nN = N.split(" ")\nN = [int(i) for i in N]\n\nsub = N[1] - N[0]\nhigh = 0 \nfor i in range(sub):\n high += i\nsnow = high - N[...
['Wrong Answer', 'Accepted']
['s197901824', 's710862293']
[3060.0, 3060.0]
[17.0, 17.0]
[161, 147]
p03328
u842170774
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['#B - Stone Monument\na,b=map(int,input().split())\nd=b-a\nb0=d*(d+1)/2\nsnow=b0-b\nint(snow)', '#B - Stone Monument\na,b=map(int,input().split())\nd=b-a\nb0=d*(d+1)/2\nsnow=b0-b\nprint(snow)', '#B - Stone Monument\na,b=map(int,input().split())\nd=b-a\nb0=d*(d+1)/2\nsnow=b0-b\nsnow', '#B - Stone Monument\na,b=map(int,...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s414059438', 's494934735', 's782783758', 's289737227']
[2940.0, 2940.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0, 17.0]
[87, 89, 82, 95]
p03328
u844005364
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input())\n\nn = b - a\noriginal_b = n * (n + 1) // 2\n\nprint(original_b - b)', 'a, b = map(int, input().split())\n \nn = b - a\noriginal_b = n * (n + 1) // 2\n \nprint(original_b - b)']
['Runtime Error', 'Accepted']
['s511200566', 's335340899']
[2940.0, 2940.0]
[17.0, 17.0]
[88, 98]
p03328
u855985627
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
["n=eval('-'+input().replace(' ','+'))\ns=0\nfor i in range(n+1):\n s+=i\nprint(s)", "a,b=(int(i) for i in input().split(' '))\nn=b-a\ns=0\nfor i in range(n):\n s+=i\nprint(s-a)"]
['Wrong Answer', 'Accepted']
['s949103573', 's490957787']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 87]
p03328
u857330600
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input())\ns=0\nfor i in range(b-a-1):\n s+=1+i\nprint(s-a)', 'a,b=map(int,input().split())\ns=0\nfor i in range(b-a-1):\n s+=1+i\nprint(s-a)']
['Runtime Error', 'Accepted']
['s770529336', 's833650360']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 75]
p03328
u859897687
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\nans=-a\nfor i in range(1,b-a+1):\n ans+=i\nprint(ans)', 'a,b=map(int,input().split())\nans=-b\nfor i in range(1,b-a+1):\n ans+=i\nprint(ans)']
['Wrong Answer', 'Accepted']
['s018761821', 's006961470']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 80]
p03328
u864900001
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nt = b-a\nb_true=0\nfor i in range(b+1):\n b_true += i\nprint(b_true-b)\n', 'a, b = map(int, input().split())\nt = b-a\nb_true=0\nfor i in range(b):\n b_true += i\nprint(b_true-b)', 'a, b = map(int, input().split())\nt = b-a\nb_true=0\nfor i in range(t+1):\n b_true += i\nprin...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s085877813', 's222580888', 's648169440']
[2940.0, 2940.0, 2940.0]
[78.0, 75.0, 17.0]
[103, 100, 103]
p03328
u865413330
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\ndiff = b - a\n\ndef generate(n):\n if n == 1:\n return 1\n return generate(n-1) + n\n\ngenerate(diff) - b', 'a, b = map(int, input().split())\n\ntower = 0\n\nfor i in range(1, b - a + 1):\n tower += i\n\nprint(tower - b)']
['Runtime Error', 'Accepted']
['s245825261', 's058718065']
[3884.0, 3060.0]
[74.0, 19.0]
[144, 107]
p03328
u869708025
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int(), input())\nx = 0\nfor i in range(b - a):\n x += x + i\n print(x - a)', 'a = int(input())\nb = int(input())\nc = int(b - a)\nd = c * (c -1) / 2\ne = int(c -1)\nf = int(1 + d + e)\nprint(int(f - b))\n\n', 'a = int(input())\nb = int(input())\nc = int(b - a)\nprint(( c * (c - 1) //2 + c - b))\n', '...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s019712362', 's020570537', 's039796130', 's269523639', 's311761625', 's504314678', 's669500540', 's828051112', 's451667461']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0, 17.0, 20.0]
[87, 120, 83, 127, 128, 85, 91, 89, 91]
p03328
u870518235
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nX = b - a\nans = 0\nfor i in range(X):\n ans += i\nprint(ans)', 'a, b = int(input())\nX = b - a\nans = 0\nfor i in range(X):\n ans += i\nprint(ans)', 'a, b = map(int, input().split())\nX = b - a\nans = 0\nfor i in range(X):\n ans += i\nprint(ans-a)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s445582759', 's957161237', 's777010070']
[9080.0, 9128.0, 9088.0]
[24.0, 23.0, 32.0]
[93, 80, 96]
p03328
u873139556
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['def main():\n a, b = map(int, input().split())\n\n h = b - a\n\n i, ans = 0\n while True:\n i += 1\n ans += i\n\n if h == i:\n break\n\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n a, b = map(int, input().split())\n\n h = 0\n for i ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s567662645', 's992414930', 's089662991']
[2940.0, 2940.0, 2940.0]
[29.0, 17.0, 17.0]
[222, 242, 256]
p03328
u890807039
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split( ))\nans = 1\ni = 2\n\nwhile a > ans:\n ans = ans + i\n i += 1\n print(ans)\n\nprint(ans-a)', 'a,b = map(int,input().split( ))\nc = b-a\nd = 0\ni = 1\nans = 0\n\nwhile c > i:\n d = d+i\n i += 1\nans = d-a\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s291666341', 's158391720']
[3188.0, 2940.0]
[18.0, 17.0]
[119, 118]
p03328
u902151549
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['# coding: utf-8\nimport time\nimport re\nimport math\nimport fractions\n\ndef main():\n A,B=map(int,input().split())\n index=B-A-1\n total=0\n for a in range(0,index+1):\n total+a+1\n print(total-B)\nstart=time.time()\nmain()\n\n#"YNeos"[True::2]\n#A=list(map(int,input().split()))\n#A,B,C=map(in...
['Wrong Answer', 'Accepted']
['s702428380', 's660100300']
[5044.0, 5044.0]
[35.0, 36.0]
[420, 421]
p03328
u906428167
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = int(input().split())\nprint((b-a)*(b-a-1)/2 - a)', 'a,b = int(input().split())\nprint((b-a)*(b-a-1)//2 - a)', 'a,b = map(int, input().split())\nprint((b-a)*(b-a-1)//2 - a)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s009284966', 's829056432', 's605793358']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[53, 54, 59]
p03328
u918601425
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['A,B=[int(s) for s in input().split()]\nx=B-A\ny=x*(x-1)//2\nprint(A+y)', 'A,B=[int(s) for s in input().split()]\nx=B-A\ny=x*(x-1)//2\nprint(y-A)\n']
['Wrong Answer', 'Accepted']
['s088403154', 's900795472']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 68]
p03328
u923270446
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nprint(sum(range(b - a)) - b)', 'a, b = map(int, input().split())\nprint(sum(range(b - a + 1)) - b)']
['Wrong Answer', 'Accepted']
['s670246577', 's049800505']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 65]
p03328
u931938233
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['def Gauss_sum(n):\n return n*(n+1)//2\na,b=map(int,input())\nfor i in range(999):\n if Gauss_sum(i+1)-a == Gauss_sum(i+2)-b:\n print(Gauss_sum(i+1)-a)\n break', 'def Gauss_sum(n):\n return n*(n+1)//2\na,b=map(int,input().split())\nfor i in range(999):\n if Gauss_sum(i+1)-a == Gauss_sum(i+2)-b:\n print(Ga...
['Runtime Error', 'Accepted']
['s290033953', 's402804440']
[8960.0, 9000.0]
[24.0, 26.0]
[160, 168]
p03328
u932465688
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nh = ((b-a-1)*(b-a)//2)-a', 'a,b = map(int,input().split())\nh = ((b-a-1)*(b-a)//2)-a\nprint(h)']
['Wrong Answer', 'Accepted']
['s951243221', 's988682392']
[2940.0, 2940.0]
[17.0, 17.0]
[55, 64]
p03328
u934868410
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int, input().split())\nprint((b-a)*(b-a-1)//2 - b)', "n = int(input())\nif n < 1000:\n print('ABC')\nelse:\n print('ABD')", 'a,b = map(int, input().split())\nprint((b-a)*(b-a-1)//2 - a)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s166409569', 's840240067', 's373814571']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[59, 65, 59]
p03328
u938594975
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = [int(i) for i in input().split()]\nn = b-a-1\nprint(n*(n+1)/2-a)', 'a,b = [int(i) for i in input().split()]\nn = b-a-1\nprint(int(n*(n+1)/2-a))']
['Wrong Answer', 'Accepted']
['s325633641', 's351472420']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 73]
p03328
u939585142
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int,input().split())\n\n\nb1 = 0\nc = b - a\n\nfor i in range(b - a):\n b1 += i\nprint(b1 - b)', 'a, b = map(int,input().split())\n\nc = b - a\nb1 = 0\nfor i in range(1,c + 1):\n b1 += i\n \n \nprint(b1 - b)']
['Wrong Answer', 'Accepted']
['s077466990', 's893699038']
[2940.0, 2940.0]
[17.0, 17.0]
[98, 104]
p03328
u940279019
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\ntmp = b - a\ncount = 0\nfor i in range(tmp):\n count += i+1\nprint(count - a)', 'a,b = map(int,input())\ntmp = b - a\ncount = 0\nfor i in range(tmp):\n count += i+1\nprint(count - a)', 'a,b = map(int,input().split())\ntmp = b - a\ncount = 0\nfor i in range(tmp):\n count += i\nprint(...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s919480560', 's954162226', 's065526895']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 18.0]
[105, 97, 103]
p03328
u948524308
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
[', b = map(int, input().split())\n\ni = 0\ns = 0\n\nfor i in range(1, b - a):\n s += i\nprint(s - a)', 'a, b = map(int, input().split())\n\ni = 0\ns = 0\n\nfor i in range(1, b - a):\n s += i\nprint(s - a)\n']
['Runtime Error', 'Accepted']
['s064930365', 's774855353']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 97]
p03328
u948911484
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nt = b-a\nprint(t*(t-1)//2-b)', 'a,b = map(int,input().split())\nt = b-a\nprint(t*(t+1)//2-b)']
['Wrong Answer', 'Accepted']
['s836046126', 's724530668']
[9132.0, 9004.0]
[26.0, 33.0]
[58, 58]
p03328
u960513073
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = list(map(int, input().split()))\nn = b-a\nprint(n*(n+1)/2 - b)', 'a,b = list(map(int, input().split()))\nn = b-a\nprint(int(n*(n+1)/2 - b))']
['Wrong Answer', 'Accepted']
['s582978857', 's438319943']
[2940.0, 2940.0]
[18.0, 18.0]
[66, 71]
p03328
u963903527
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['import numpy as np\na, b = input().split(" ")\na = int(a)\nb = int(b)\n\nc = b - a\ns = sum(list(np.arange(c)))\nprint(a - s)\n', 'import numpy as np\na, b = input().split(" ")\na = int(a)\nb = int(b)\n\nc = b - a\ns = sum(list(np.arange(c)))\nprint(s - a)\n']
['Wrong Answer', 'Accepted']
['s281777490', 's915510521']
[15276.0, 21384.0]
[461.0, 308.0]
[119, 119]
p03328
u969226579
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a, b = map(int, input().split())\nprint((b - a) * (b - a - 1) / 2 - a)\n', 'a, b = map(int, input().split())\nans = (b - a) * (b - a - 1) / 2 - a\nprint(int(ans))\n']
['Wrong Answer', 'Accepted']
['s358780902', 's287716209']
[3316.0, 2940.0]
[59.0, 17.0]
[70, 85]
p03328
u982594421
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['from itertools import accumulate\nt = [n for n in accumulate(range(10000))]\n\na, b = map(int, input().split())\nprint(t[b - a - 1] - b)\n', 'from itertools import accumulate\nt = [n for n in accumulate(range(10000))]\n \na, b = map(int, input().split())\nprint(t[b - a] - b)\n']
['Wrong Answer', 'Accepted']
['s181332498', 's625735672']
[3444.0, 3444.0]
[18.0, 18.0]
[133, 130]
p03328
u982896977
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nn = b - a\ns = 1/2 * n * (1 + n)\nprint(s - b)', 'a,b = map(int,input().split())\nn = b - a\ns = 1/2 * n * (1 + n)\nx = s - b\nprint(int(x))']
['Wrong Answer', 'Accepted']
['s993833717', 's434350554']
[2940.0, 2940.0]
[20.0, 18.0]
[75, 86]
p03328
u983918956
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b = map(int,input().split())\nprint(1/2*(a**2-a-2*a*b-b+b**2))\n', 'a,b = map(int,input().split())\nprint(int(1/2*(a**2-a-2*a*b-b+b**2)))\n']
['Wrong Answer', 'Accepted']
['s959721742', 's007745652']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 69]
p03328
u983967747
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['a,b=map(int,input().split())\ny=0\nhigh=0\nfor i in range(1,1000):\n y+=i\n x.append(y)\nfor xz in x:\n if xz < b:\n high=xz\nprint(high-a)', 'a,b=map(int,input().split())\ny=0\nhigh=0\nfor i in range(1,1000):\n y+=i\n x.append(y)\nfor xz in x:\n if xz <= b:\n high=xz\n d=high-a...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s109908863', 's300068477', 's716660975', 's955613136', 's052412765']
[2940.0, 2940.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0, 18.0, 17.0]
[146, 159, 420, 453, 501]
p03328
u986269893
2,000
262,144
In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we measured the lengths of the parts of those towers that are not cov...
['n=input().split(" ")\na=int(n[0])\nb=int(n[1])\nc=b-a\nprint(((c*(c+1))/2)-b)', 'n=input().split(" ")\na=int(n[0])\nb=int(n[1])\nc=b-a\nprint (int(((c*(c+1))/2)-b))']
['Wrong Answer', 'Accepted']
['s602856936', 's766614904']
[2940.0, 3316.0]
[17.0, 22.0]
[73, 79]
p03329
u015318452
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['import math\n\ndef A():\n x, a, b = [int(x) for x in input().split()]\n if abs(x-a) < abs(x-b):\n print(\'A\')\n else:\n print(\'B\')\ndef B():\n S = input()\n alphabet = [False for x in range(26)]\n for char in S:\n i = ord(char) - ord(\'a\')\n alphabet[i] = True\n pr...
['Wrong Answer', 'Accepted']
['s971253370', 's874425892']
[3188.0, 17168.0]
[22.0, 1987.0]
[1013, 1688]
p03329
u021548497
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['n = int(input())\npayable = [1] + [6**(int(x)+1) for x in range(6)] + [9**(int(x)+1) for x in range(5)]\npayable.sort()\nans = 0\nwhile n > 0:\n for value in payable:\n if value > n:\n payable.remove(value)\n n -= max(payable)\n ans += 1\nprint(ans)', 'n = int(input())\npayable = [1] + [6**...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s716073168', 's943253150', 's581549082']
[3060.0, 3064.0, 3992.0]
[18.0, 17.0, 287.0]
[266, 310, 651]
p03329
u026788530
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['N = int(input())\n\nprint("a")\n"""\n#memo = [[ -1 for i in range(12)]for j in range(100000)]\nn = 6\nwhile True:\n num.append(n)\n n *= 6\n if n > 100000:\n break\nn = 9\nwhile True:\n num.append(n)\n n *= 9\n if n > 100000:\n break\nnum.sort()\n\nans = 0\nprint(num)\n#while N > 6:\n\...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s143387310', 's822998686', 's926753698', 's650302261']
[4576.0, 26228.0, 3064.0, 7064.0]
[597.0, 2105.0, 232.0, 578.0]
[1184, 784, 1186, 370]
p03329
u036104576
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['import sys\nimport itertools\n# import numpy as np\nimport time\nimport math\nimport heapq\nfrom collections import defaultdict\nsys.setrecursionlimit(10 ** 7)\n \nINF = 10 ** 18\nMOD = 10 ** 9 + 7\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n# map(int...
['Wrong Answer', 'Accepted']
['s632981777', 's192683682']
[10320.0, 10008.0]
[572.0, 614.0]
[642, 629]
p03329
u039623862
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
["n = int(input())\n\nmin_cnt = float('inf')\nfor i in range(n//6+1):\n cnt = 0\n t = i\n while t>6:\n\tcnt += t%6\n \tt //= 6\n cnt += t\n \n for j in range((n-6*i)//9+1):\n t = j\n while t>9:\n cnt += t%9\n t //= 9\n cnt += t\n cnt += (n-6*i-9*j)\n if cnt < min_cnt:\n min_cnt = cn...
['Runtime Error', 'Accepted']
['s451613929', 's544802651']
[2940.0, 3316.0]
[17.0, 57.0]
[314, 301]
p03329
u047023156
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['import math, sys\nfrom bisect import bisect_left, bisect_right\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom functools import lru_cache\nfrom heapq import heapify, heappop, heappush\nfrom itertools import accumulate, combinations, permutations\ninput = sys.stdin.readline\nmod =...
['Runtime Error', 'Accepted']
['s407013825', 's068445567']
[3680.0, 3680.0]
[24.0, 363.0]
[762, 764]
p03329
u050428930
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['n=int(input())\ns=[]\nt=[]\np=0\ndef f9(n,p):\n while n>=9:\n n//=9\n p+=1\n f9(n,p)\n return p\ndef f6(n,p):\n while n>=6:\n n//=6\n p+=1\n f6(n,p)\n return p \ns.append((n,0))\nwhile s:\n print(s)\n a=s[0][0]\n b=s[0][1]\n if a<6:\n t.appen...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s285017783', 's683841984', 's888880398', 's578606592']
[66920.0, 3064.0, 2940.0, 3828.0]
[2104.0, 17.0, 17.0, 1007.0]
[444, 314, 428, 409]
p03329
u055007876
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['N = int(input())\n\ndef num_withdraw_ll(N):\n dp = [N] * (N + 1)\n dp[0] = 0\n for n in range(1, N):\n dp[n + 1] = min(dp[n + 1], dp[n] + 1)\n coin = 6\n while coin <= N:\n dp[n + coin] = min(dp[n + coin], dp[n] + 1)\n coin *= 6\n coin = 9\n while coin...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s245550988', 's704179689', 's725325715', 's362781559']
[3828.0, 2940.0, 3828.0, 3828.0]
[209.0, 17.0, 479.0, 453.0]
[438, 441, 446, 443]
p03329
u059210959
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['#encoding utf-8\n\nn = int(input())\n\nwithdraw_list = []\nwithdraw_list.append(1)\n# 6\ncount = 0\nwhile (1):\n count += 1\n if 6**count <=10**5:\n withdraw_list.append(6**count)\n else:\n break\ncount = 0\nwhile (1):\n count += 1\n if 9**count <=10**5:\n withdraw_list.append(9**c...
['Wrong Answer', 'Accepted']
['s019594580', 's724023168']
[3064.0, 14452.0]
[17.0, 722.0]
[652, 1509]
p03329
u062147869
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['from collections import defaultdict\nN,C = map(int,input().split())\nD=[[int(i) for i in input().split()] for j in range(C)]\nco=[[int(i) for i in input().split()] for j in range(N)]\nd0= defaultdict(int)\nd1= defaultdict(int)\nd2= defaultdict(int)\nfor i in range(N):\n for j in range(N):\n if (j+i) %3==0:\...
['Runtime Error', 'Accepted']
['s836831060', 's713214916']
[3316.0, 3060.0]
[21.0, 291.0]
[1351, 216]
p03329
u063896676
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['# coding: utf-8\n\n\n# 15:00-\n\n\ndef main():\n N = int(input())\n\n ans = 0\n\n while True:\n if N < 6:\n ans += N\n return ans\n\n n = 0\n while 9**(n+1) <= N:\n n += 1\n \n m = 0\n while 6**(m+1) <= N:\n m += 1\n ...
['Wrong Answer', 'Accepted']
['s782211028', 's552155636']
[3060.0, 21204.0]
[18.0, 1526.0]
[432, 806]
p03329
u073775598
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['#ABC099C\nN=int(input())\n#1:6 2:36 3:216 4:1296 5:7776 6:46656 7:9 8:81 9:729 10:6561 11:59049\n#dv=[6,36,216,1296,7776,46656,9,81,729,6561,59049]\nlm=[6, 6, 6, 6, 6, 3, 9, 9, 9, 9, 2]\n#ans=[0]*11\nans=0\nsums=0\nfor i in range(lm[0]):\n for j in range(lm[1]):\n for k in range(lm[2]):\n for l i...
['Time Limit Exceeded', 'Accepted']
['s407029261', 's541135799']
[3064.0, 3060.0]
[2104.0, 328.0]
[1078, 252]
p03329
u075012704
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
["N = int(input())\ndp = [float('inf')] * (10**5+1)\ndp[0] = 0\n\nfor i in range(1, N+1):\n dp[i] = min(dp[i-1], dp[i-6], dp[i-6**2], dp[i-6**3], dp[i-6**4], dp[i-6**5], dp[i-6**7],\n dp[i-9], dp[i-9**2], dp[i-9**3], dp[i-9**4], dp[i-9**5]) + 1\n\nprint(dp[N])\n", "N = int(input())\ndp = [float('inf')...
['Runtime Error', 'Runtime Error', 'Accepted']
['s633307911', 's891956226', 's973318895']
[3956.0, 4596.0, 9520.0]
[20.0, 20.0, 516.0]
[269, 271, 348]
p03329
u091051505
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['def calc(money, count):\n if money == n:\n return count\n if money > n:\n return inf\n a = [calc(money+i, count+1) for i in num]\n return min(a)\nimport bisect\ninf = 10 ** 10\nnum = [6 ** i for i in range(7)] + [9 ** i for i in range(1, 6)]\nn = int(input())\nnum = num[:bisect.bisect_left(n...
['Runtime Error', 'Accepted']
['s419955881', 's351929345']
[4248.0, 3828.0]
[2104.0, 1351.0]
[325, 328]
p03329
u095426154
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['n=int(input())\ndp=[i for i in range(n+1)]\nk=0\nlw=[6,9]\nfor w in lw:\n while w**k<=n:\n k+=1\n q=w**k\n for j in range(n+1-q):\n dp[j+q]=min(dp[j]+1,dp[j+q])\n if j==q*w:\n break\nprint(dp[n])', 'n=int(input())\ndp=[i for i in range(n+1)]\nk=0\nlw=[6,9]\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s229471550', 's247600064', 's883477330']
[7064.0, 7064.0, 7064.0]
[81.0, 81.0, 488.0]
[244, 248, 203]
p03329
u102902647
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['# -*- coding: utf-8 -*-\n"""\nCreated on Mon Aug 6 17:34:40 2018\n\n@author: Yuki\n"""\n\n#N = int(input())\nN = 44852\n#candidates = [1, 6, 36, 216, 1296, 7776, 46656,\n# 9, 81, 729, 6561, 59049]\ncandidates = [1, 6, 9, 36, 81, 216, 729, 1296, 6561, 7776,\n 46656, 59049]\ncnt = 0\nwhile Tr...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s834678321', 's959949237', 's561010314']
[3064.0, 3064.0, 3828.0]
[17.0, 17.0, 334.0]
[737, 737, 490]
p03329
u105124953
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
["import math\n#n = int(input())\nn = 44852\ninf = float('inf')\n\ndp = [inf]*(n+10000000)\ndp[0]=0\n#print(dp)\n#print(len(dp))\n\ndef motome(target):\n tmp = []\n a = int(math.log(target,9))\n b = int(math.log(target,6))\n for i in range(a+1):\n tmp.append(6**i)\n for j in range(b+1):\n t...
['Wrong Answer', 'Accepted']
['s970138607', 's201841752']
[81524.0, 3828.0]
[394.0, 100.0]
[871, 310]
p03329
u118642796
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['num = [i for i in range(0,100001)]\n\nfor j in range(1,100001):\n num[j] = j//6 + num[j%6]\n\nfor j in range(1,100001):\n num[j] = min(num[j],j//9+num[j%9])\n\nfor j in range(1,100001):\n num[j] = min(num[j],j//36+num[j%36])\n\nfor j in range(81,324):\n num[j] = min(num[j],1+num[j-81])\nfo...
['Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s782820589', 's786363031', 's567318293']
[7112.0, 7104.0, 7804.0]
[2104.0, 489.0, 1234.0]
[1176, 1666, 445]
p03329
u123896133
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['N=int(input())\nans=N\ndef func1():\n global ans\n for i in range(N+1):\n cnt=0\n t=i\n while(t>0):\n cnt+=t%6\n t/=6\n t=int(t)\n t=N-i\n while(t>0):\n cnt+=t%9\n t/=9\n t=int(t)\n print(cnt)\n if...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s275840784', 's554124242', 's654706753']
[3784.0, 3064.0, 3064.0]
[402.0, 20.0, 329.0]
[366, 400, 347]
p03329
u127499732
2,000
262,144
To make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation: * 1 yen (the currency of Japan) * 6 yen, 6^2(=36) yen, 6^3(=216) yen, ... * 9 yen, 9^2(=81) yen, 9^3(=729) yen, ... At least how many operations are required to withdraw ...
['n = int(input())\nc9 = 0\nm = n\nwhile(m>1):\n m = m//9\n if m !== 0: \n \tpass\n else:\n c9 += 1\nm = n - 9**c9\n\nc6 = 0\nwhile(m>1):\n m = m//9\n if m !== 0: \n \tpass\n else:\n c6 += 1\n \nc1 = n - (9**c9+c6**c6)\nprint(c9+c6+c1) ', 'n = int(input())\nl9 = [9**i for i in range(0,6)]\nl6 = [6**i f...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s184703189', 's542419147', 's273502306']
[2940.0, 3064.0, 3864.0]
[17.0, 18.0, 290.0]
[229, 283, 405]