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
p02712
u289036437
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nm = n//15\nl = n%15\nx = 60*(m**2)\ny = [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]\nfor i in range(1,l+1):\n if(y[i] != 0):\n x += y[i]+m*15\nprint(x)a', 'n = int(input())\nm = n//15\nl = n%15\nx = 60*(m**2)\ny = [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]\nfor i in range(1,l+1):\n if(y[i] != 0):\n x += y[i]+m*15\nprint(x)']
['Runtime Error', 'Accepted']
['s981387682', 's027851041']
[9048.0, 9180.0]
[24.0, 21.0]
[165, 164]
p02712
u297399512
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['total = []\n\nN = int(input())\n\nfor i in range(1, N):\n if i % 3 == 0 and i % 5 == 0:\n pass\n elif i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n total.append(i)\n\nprint(total)\n', 'total = []\n\nN = int(input())\n\nfor i in range(1, N + 1):\n if i % 3 == 0 and i % 5 == 0:\n pass\n elif i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n total.append(i)\n\nprint(sum(total))\n']
['Wrong Answer', 'Accepted']
['s369125089', 's544749447']
[38308.0, 29844.0]
[274.0, 217.0]
[215, 224]
p02712
u301337088
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["number = int(input())\n\nfor i in range(1, 1000000 + 1):\n Total = []\n\n if (i % 3 == 0) and (i % 5 ==0):\n print('FizzBuzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n print(str(i))\n\n print(sum(Total))", "i = int(input())\nTotal = []\n\nfor i in range(1, i + 1):\n\n if (i % 3 == 0) and (i % 5 == 0):\n 'FizzBuzz'\n elif i % 3 == 0:\n 'Fizz'\n elif i % 5 == 0:\n 'Buzz'\n else:\n Total.append(i)\n\n print(sum(Total))", "number = int(input())\nTotal = []\n\nfor i in range(1, number + 1):\n\n if (i % 3 == 0) and (i % 5 ==0):\n print('FizzBuzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n Total.append(i)\n\n print(sum(Total))", "number = int(input())\nTotal = []\n\nfor i in range(1, number + 1):\n\n if (i % 3 == 0) and (i % 5 == 0):\n 'FizzBuzz'\n elif i % 3 == 0:\n 'Fizz'\n elif i % 5 == 0:\n 'Buzz'\n else:\n Total.append(i)\n\n print(sum(Total))", "number = int(input())\n\nfor i in range(1, number + 1):\n Total = []\n\n if (i % 3 == 0) and (i % 5 ==0):\n print('FizzBuzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n print(str(i))\n\n print(sum(Total))", 'n = int(input())\nTotal = []\n\nfor i in range(1, n + 1):\n\n if (i % 3 == 0) and (i % 5 == 0):\n "FizzBuzz"\n elif i % 3 == 0:\n "Fizz"\n elif i % 5 == 0:\n "Buzz"\n else:\n Total.append(i)\n\n print(sum(Total))', 'n = int(input())\nTotal = []\n\nfor i in range(1, n + 1):\n\n if (i % 3 == 0) and (i % 5 == 0):\n "FizzBuzz"\n elif i % 3 == 0:\n "Fizz"\n elif i % 5 == 0:\n "Buzz"\n else:\n Total.append(i)\n\nprint(sum(Total))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s086346400', 's090163603', 's260639223', 's664960967', 's965181400', 's988373526', 's829919636']
[10424.0, 10288.0, 10128.0, 10316.0, 10412.0, 10384.0, 29924.0]
[716.0, 2206.0, 2206.0, 2206.0, 684.0, 2206.0, 219.0]
[278, 245, 275, 255, 277, 245, 237]
p02712
u306260540
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nsum = 0\nfor i in range(n+1):\n not (i % 3 == 0 and i % 5 ==0):\n sum += i\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(n+1):\n if not (i % 3 == 0 and i % 5 ==0):\n sum += i\nprint(sum)\n', 'n = int(input())\nsum = 0\nfor i in range(n+1):\n if not (i % 3 == 0 or i % 5 ==0):\n sum += i\nprint(sum)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s384878895', 's415424452', 's497788116']
[9024.0, 9156.0, 9160.0]
[22.0, 157.0, 151.0]
[109, 113, 112]
p02712
u307358646
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n \norg_sum = 1/2 * N * (N+1)\ndiv3 = N // 3\nsum3 = 3/2 * div3 * (div3+1)\ndiv5 = N // 5\nsum5 = 5/2 * div5 * (div5+1)\ndiv15 = N // 15\nsum15 = 15/2 * div15 * (div15+1)\n \nprint(org_sum - sum3 - sum5 + sum15)', 'N = input()\n \norg_sum = 1/2 * N * (N+1)\ndiv3 = N // 3\nsum3 = 3/2 * div3 * (div3+1)\ndiv5 = N // 5\nsum5 = 5/2 * div5 * (div5+1)\ndiv15 = N // 15\nsum15 = 15/2 * div15 * (div15+1)\n \nreturn org_sum - sum3 - sum5 + sum15', 'N = input()\n \norg_sum = 1/2*N*(N+1)\ndiv3 = N // 3 * 3\ndiv5 = N // 5 * 5\ndiv15 = N // 15 * 15\n \nreturn org_sum - div3 - div5 + div15', 'N = input()\n\norg_sum = 1/2*N*(N+1)\ndiv3 = N // 3\ndiv5 = N // 5\ndiv15 = N // 15\n\nreturn org_sum - div3 - div5 + div15', 'N = int(input())\n \norg_sum = 1/2 * N * (N+1)\ndiv3 = N // 3\nsum3 = 3/2 * div3 * (div3+1)\ndiv5 = N // 5\nsum5 = 5/2 * div5 * (div5+1)\ndiv15 = N // 15\nsum15 = 15/2 * div15 * (div15+1)\n \nreturn org_sum - sum3 - sum5 + sum15', 'N = int(input())\n \norg_sum = 1 * N * (N+1) // 2\ndiv3 = N // 3\nsum3 = 3 * div3 * (div3+1) //2\ndiv5 = N // 5\nsum5 = 5 * div5 * (div5+1) // 2\ndiv15 = N // 15\nsum15 = 15 * div15 * (div15+1) // 2\n \nprint(org_sum - sum3 - sum5 + sum15)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s004718019', 's229709075', 's427201246', 's428869410', 's992948994', 's716056782']
[9112.0, 9112.0, 9088.0, 9096.0, 9052.0, 9180.0]
[21.0, 24.0, 26.0, 23.0, 23.0, 21.0]
[218, 213, 131, 116, 218, 229]
p02712
u307418002
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input() )\n \nsum=0\nfor i in range(n):\n if i%3 != 0 and i%5 != 0:\n sum+=i\n elif i%3 !=0:\n sum+=i\n elif i%5 !=0:\n sum+=i\n \nprint(sum)', 'n = int(input() )\n \nsum=0\nfor i in range(n):\n# print(i+1)\n j=i+1\n if j%3 != 0 and j%5 != 0:\n sum+=j\n #print(sum)\n\nprint(sum)']
['Wrong Answer', 'Accepted']
['s025338339', 's716490245']
[9172.0, 9164.0]
[210.0, 198.0]
[169, 147]
p02712
u312748806
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nsum = 0\nfor i in range(n):\n if i%3 ==0 and i%5 == 0:\n sum += i\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(n+1):\n if i%3!=0 and i%5!=0:\n sum = sum+i\nprint(sum)']
['Wrong Answer', 'Accepted']
['s755520237', 's002159308']
[9160.0, 9164.0]
[110.0, 154.0]
[100, 102]
p02712
u316649390
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a = 0\nn = int(N)\nfor i in range(1,n+1):\n if i % 5 != 0 and i % 3 != 0:\n a = a + i\n else:\n continue\nprint(a)', 'a = 0\nN = input()\nn = int(N)\nfor i in range(1,n+1):\n if i % 5 != 0 and i % 3 != 0:\n a = a + i\n else:\n continue\nreturn(a)', 'a = 0\nn = int(N)\nfor i in range(1,n+1):\n if i % 5 != 0 and i % 3 != 0:\n a = a + i\n else:\n continue\nreturn(a)', 'a = 0\nN = input()\nn = int(N)\nfor i in range(1,n+1):\n if i % 5 != 0 and i % 3 != 0:\n a = a + i\n else:\n continue\nprint(a)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s194921798', 's195710585', 's617649415', 's914986882']
[9028.0, 9040.0, 9104.0, 9164.0]
[22.0, 23.0, 21.0, 168.0]
[127, 140, 128, 139]
p02712
u317423698
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import sys\nn = int(sys.stdin)\nprint(sum(i for i in range(1, n + 1) if i % 3 and i % 5))', 'import sys\nn = int(sys.stdin.read())\nprint(sum(i for i in range(1, n + 1) if i % 3 and i % 5))']
['Runtime Error', 'Accepted']
['s300995722', 's096460485']
[9016.0, 9048.0]
[24.0, 100.0]
[87, 94]
p02712
u318182140
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a = int(input())\nsum = 0\nfor i in range(a):\n if i % 3 != 0 or i % 5 != 0:\n sum += i\n else:\n pass\nprint(sum)', 'n = int(input())\nlsum = []\nfor i in range(1, n+1):\n if i % 3 or i % 5 == 0:\n pass\n else:\n lsum.append(i)\nprint(sum(lsum))', 'a = int(input())\nsum = 0\nfor i in range(a):\n if i % 3 != 0 or i % 5 != 0:\n sum += i\n else:\n pass\nprint(sum)', 'a = int(input())\nsum = 0\nfor i in range(a):\n if i % 3 != 0 or i % 5 != 0:\n sum += i\n else:\n pass\nprint(sum)', 'n = int(input())\nlsum = []\nfor i in range(1, n+1):\n if i % 3 or i % 5 == 0:\n pass\n else:\n lsum.append(i)\nprint(sum(lsum))', 'a = int(input())\nlnum = []\nfor i in range(1, a+1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n lnum.append(i)\nprint(sum(lnum))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s247544362', 's292043857', 's467551201', 's861817937', 's967774032', 's838053008']
[9164.0, 19600.0, 9164.0, 9164.0, 19460.0, 29980.0]
[157.0, 114.0, 173.0, 163.0, 128.0, 154.0]
[127, 141, 127, 127, 141, 146]
p02712
u318740143
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\na = N//3\nb = N//5\nc = N//15\n\nans = (N*(N+1)/2) - 3*a(a+1)/2 -5*b(b+1)/2 + 15*c(c+1)/2\nprint(int(ans))', 'N = int(input())\na = N//3\nb = N//5\nc = N//15\n\nans = (N*(N+1)//2) - (3*a*(a+1)//2) -(5*b*(b+1)//2) + (15*c*(c+1)//2)\nprint(ans)']
['Runtime Error', 'Accepted']
['s530171847', 's666252560']
[9148.0, 9176.0]
[22.0, 23.0]
[118, 126]
p02712
u318909153
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\ncount = 0\nfor x in range(1, N+1):\n if x%3==0 or x%5==0:\n count=count+x\n print(count)\nprint(count)\n', 'N = int(input())\ncount = 0\nfor x in range(1, N):\n if x%3==0 or x%5==0:\n count=count+x\nprint(count)', 'N = int(input())\ncount = 0\nfor x in range(0, N+1):\n if x%3!=0 and x%5!=0:\n count=count+x\nprint(count)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s352320981', 's538089168', 's233224501']
[9236.0, 9084.0, 9168.0]
[307.0, 144.0, 146.0]
[130, 107, 110]
p02712
u319245933
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['def is_fb(i):\n if i % 3 == 0:\n return True\n if i % 5 == 0:\n return True\n return False\n\nN = int(input())\n\nprint(sum([a for a in range(1, N - 1) if not is_fb(a)]))\n', 'N = int(input())\n\nprint(\n sum(\n filter(\n lambda x: bool(x % 3) and bool(x % 5),\n range(1, N+1)\n )\n )\n)\n']
['Wrong Answer', 'Accepted']
['s809847497', 's277485578']
[29980.0, 9160.0]
[162.0, 199.0]
[185, 145]
p02712
u321096814
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import sys\n\nX = input()\ncount = 0\nfor num in range(X):\n if not num % 3 == 0 or num % 5 == 0:\n count = count + num\nprint(count)', 'import sys\n \nX = int(input())\ncount = 0\nfor num in range(1, X+1):\n if num % 3 == 0 or num % 5 == 0:\n continue\n else:\n count = count + num\nprint(count)']
['Runtime Error', 'Accepted']
['s522929281', 's405401664']
[9036.0, 9168.0]
[24.0, 154.0]
[130, 158]
p02712
u323776907
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a = int(input())\nsum = 0\nlist_number = []\nfor i in range(a):\n list_number.append(i)\nfor i in list_number:\n if i % 3 == 0 and i % 5 == 0:\n list_number.remove(i)\nfor i in list_number:\n if i % 3 == 0:\n list_number.remove(i)\nfor i in list_number:\n if i % 5 == 0:\n list_number.remove(i)\nfor i in list_number:\n sum = sum + i\nprint(list_number)\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(1, n + 1):\n if i !% 3 or i !% 5:\n sum = sum + i\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(1, n+1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\nprint(sum)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s101124226', 's288011416', 's323393572']
[48512.0, 8980.0, 9076.0]
[2207.0, 23.0, 142.0]
[384, 102, 111]
p02712
u324975917
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N1 = int(input())\nc = []\nfor i in range(1,3*N1):\n if i%3 != 0 and i%5 != 0:\n c.append(i)\n print(i)\n if i ==N1:\n break\nsum(c)', 'c = []\nfor i in range(1,3*N1):\n if i%3 != 0 and i%5 != 0:\n c.append(i)\n print(i)\n if i ==N1:\n break\nsum(c)', 'N1 = int(input())\nc = []\nfor i in range(1,3*N1):\n if i%3 != 0 and i%5 != 0:\n c.append(i)\n if i ==N1:\n break\nsum(c)', 'n = int(input())\nc = []\nfor i in range(1,3*n):\n if i%3 != 0 and i%5 != 0:\n c.append(i)\nsum(c)', 'N1 = int(input())\nc = []\nfor i in range(1,3*N1):\n if i%3 != 0 and i%5 != 0:\n c.append(i)\n if i ==N1:\n break\nprint(sum(c))']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s435719144', 's547871474', 's653356706', 's898722237', 's783843572']
[30220.0, 9020.0, 29916.0, 72300.0, 29992.0]
[376.0, 19.0, 203.0, 466.0, 200.0]
[151, 133, 134, 103, 141]
p02712
u325660636
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\na = list()\n\nfor i in range(1,N+1):\n print(i)\n if i % 3 == 0:\n continue\n if i % 5 == 0:\n continue\n else:\n a.append(i)\n# print(a)\nprint(sum(a))', 'N = int(input())\na = list()\n\nfor i in range(1,N+1):\n # print(i)\n if i % 3 == 0:\n continue\n if i % 5 == 0:\n continue\n else:\n a.append(i)\n# print(a)\nprint(sum(a))']
['Wrong Answer', 'Accepted']
['s233857024', 's053397292']
[30896.0, 29984.0]
[486.0, 166.0]
[191, 193]
p02712
u331997680
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nQ = 0\nfor i in range(N+1):\n if(N%3 !== 0 or N%5 !== 0):\n Q += i\nprint(Q)', ' = input()\nQ = 0\nfor i in range(int(N)):\n P = []\n for j in range(len(str(i))):\n k= str(i)\n P.append(int(k[j]))\n if(sum(P)%3 == 0 and P[-1]/5 == 0):\n Q += 0\n elif(sum(P)%3 == 0):\n Q += 0\n elif(P[-1] == 0 or P[-1] == 5):\n Q += 0\n else:\n Q += i\nprint(Q)', 'N = int(input())\nQ = 0\nfor i in range(N+1):\n if(N%3 !== 0 and N%5 !== 0):\n Q += i\nprint(Q)', 'N = input()\nQ = 0\nfor i in range(int(N)):\n P = []\n for j in range(len(str(i))):\n k= str(j)\n P.append(int(k[j]))\n if(sum(P)%3 == 0 and P[-1] == 0 or P[-1] == 5):\n Q += 0\n elif(sum(P)%3 == 0):\n Q += 0\n elif(P[-1] == 0 or L[-1] == 5):\n Q += 0\n else:\n Q += i\nprint(Q)', 'N = int(input())\nQ = 0\nfor i in range(1,N+1):\n if(i%3 !== 0 and i%5 !== 0):\n Q += i\nprint(Q)', 'N = int(input())\n\nfor i in range(N+1):\n if(N%3 !> 0 !< N%5):\n M += i\nprint(M)\n ', 'N = int(input())\nQ = 0\nfor i in range(1,N+1):\n if(i%3 != 0 and i%5 != 0):\n Q += i\nprint(Q)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s071360387', 's266388964', 's298173400', 's674050725', 's798323256', 's957253616', 's135297512']
[9020.0, 9004.0, 9020.0, 9200.0, 8908.0, 8952.0, 9160.0]
[20.0, 23.0, 20.0, 23.0, 21.0, 22.0, 153.0]
[95, 282, 96, 287, 98, 90, 96]
p02712
u332933608
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import math\n \nK = int(input())\n \n_sum = 0\n \nfor a in range(1, K):\n for b in range(1, K):\n for c in range(1, K):\n _sum += math.gcd(math.gcd(a, b), c)\nprint(_sum)', 'N = int(input())\n \n_sum = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i % 5 != 0:\n _sum += i\n \nprint(_sum)']
['Wrong Answer', 'Accepted']
['s256059391', 's539655120']
[9116.0, 9172.0]
[2205.0, 156.0]
[181, 117]
p02712
u333546629
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input)\n\nprint(sum(i for i in range(1,N+1) if i%3==0 or i%5==0))', 'N=int(input())\n\nprint(sum(i for i in range(1,N+1) if i%3 and i%5))']
['Runtime Error', 'Accepted']
['s048796557', 's297564928']
[9024.0, 9132.0]
[20.0, 94.0]
[70, 67]
p02712
u342456871
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\n\nfb = long(0)\nfor i in range(n):\n if(i%5 != 0 and i%3 != 0):\n fb = fb + i\n\nprint(fb)', 'n = int(input())\n\nfb = 0\nfor i in range(n+1):\n if(i%5 != 0 and i%3 != 0):\n fb = fb + i\n\nprint(fb)\n']
['Runtime Error', 'Accepted']
['s646383711', 's621997637']
[9164.0, 9156.0]
[21.0, 157.0]
[111, 108]
p02712
u347452770
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = input()\nsum = 0\nfor i in range(n):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n \nprint(sum)', 'n = input()\nsum = 9\nfor i in range(n):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n \nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(1, n+1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n \nprint(sum)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s355469207', 's864852087', 's461944032']
[9120.0, 9096.0, 9168.0]
[19.0, 19.0, 145.0]
[99, 99, 109]
p02712
u347600233
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nprint(sum(i for i in range(i, n + 1) if i % 3 and i % 5))', 'n = int(input())\nprint(sum(i for i in range(1, n + 1) if i % 3 and i % 5))']
['Runtime Error', 'Accepted']
['s050594307', 's215740293']
[9168.0, 9076.0]
[20.0, 100.0]
[74, 74]
p02712
u349888092
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nans = 0\nfor x in range(1,N+1):\n if(x % 3 == 0):\n ans += 0\n elif(x % 5 ==0):\n ans += 0\n else:\n ans += x\n print(x)\n\nprint(ans)', 'N = int(input())\nans = 0\nfor x in range(1,N+1):\n if(x % 3 == 0):\n ans += 0\n elif(x % 5 ==0):\n ans += 0\n else:\n ans += x\n #print(x)\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s473554670', 's731385120']
[9224.0, 9172.0]
[339.0, 183.0]
[178, 179]
p02712
u350093546
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\nsum=0\n\nfor i in range(n+1):\n if i%3==1 or i%3==2:\n if i%5==1 or i%5==2 or i%5==3 or i%5==4:\n sum+=i\nprint sum\n', 'n=int(input())\nsum=0\n\nfor i in range[n+1]:\n if i%3==1 or i%3==2:\n if i%5==1 or i%5==2 or i%5==3 or i%5==4:\n sum+=i\nprint sum\n', 'n=int(input())\nsum=0\n\nfor i in range(1,n+1):\n if i%3!=0 and i%5!=0:\n sum+=i\nprint(sum)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s350203293', 's368709416', 's660596536']
[8968.0, 9036.0, 9148.0]
[24.0, 22.0, 161.0]
[134, 134, 90]
p02712
u350412774
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\ns=0\nfor i in range(1, n+1):\n\tif i%3 != 0 and i%5 != 0:\n\t\ts+=i\nprint(i)', 'n = int(input())\ns=0\nfor i in range(1, n+1):\n\tif i%3 != 0 and i%5 != 0:\n\t\ts+=i\nprint(s)']
['Wrong Answer', 'Accepted']
['s999466223', 's827530209']
[9156.0, 9096.0]
[153.0, 155.0]
[87, 87]
p02712
u350667455
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nans=0\nfor i in range(N+1):\n if i%5!=0 or i%3!=0:\n ans+=i\nprint(ans)', 'N = int(input())\nans=0\nfor i in range(N+1):\n if i%5!=0:\n ans+=i\n elif i%3!=0:\n ans+=i\nprint(ans)', 'N = int(input())\nans=0\nfor i in range(N+1):\n if i%5!=0 and i%3!=0:\n ans+=i\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s074131605', 's831411584', 's643501099']
[9088.0, 9072.0, 8972.0]
[153.0, 163.0, 167.0]
[94, 117, 95]
p02712
u355154595
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a=int(input())\n\nprint((1+a)*a/2-(a//3)*(3+a//3*3)/2-(a//5)*(5+a//5*5)/2+(a//15)*(15+a//15*15)/2)', 'a=int(input())\n\nprint(int((1+a)*a/2-(a//3)*(3+a//3*3)/2-(a//5)*(5+a//5*5)/2+(a//15)*(15+a//15*15)/2))\n']
['Wrong Answer', 'Accepted']
['s781361487', 's184257328']
[9176.0, 8984.0]
[21.0, 22.0]
[96, 102]
p02712
u357166854
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nnumber_list = []\nsummury = 0\nfor i in range(N):\n if (i+1) % 3 != 0 or (i+1) % 5 != 0:\n number_list.append(i+1)\n \nfor i in range(len(number_list)):\n summury += number_list[i]\n\nprint(summury)', 'N = int(input())\nnumber_list = []\nsummury = 0\nfor i in range(N):\n if (i+1) % 3 != 0 and (i+1) % 5 != 0:\n number_list.append(i+1)\n \nfor i in range(len(number_list)):\n summury += number_list[i]\n \nprint(summury)']
['Wrong Answer', 'Accepted']
['s059370282', 's049625182']
[45900.0, 29804.0]
[334.0, 275.0]
[214, 216]
p02712
u362563655
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nA = list(range(N+1))\nS = sum(A)\n\nn3 = N // 3\nB = list(range(n3+1))\nS3 = 3*sum(B)\n\nn5 = N // 5\nC = list(range(n5+1))\nS5 = 5*sum(C)\n\nn15 = N // 15\nD = list(range(n15+1))\nS15 = 15*sum(D)\n\nprint(S,S3,S5,S15)\n\nprint(S-S3-S5+S15)', 'N = int(input())\nA = list(range(N+1))\nS = sum(A)\n\nn3 = N // 3\nB = list(range(n3+1))\nS3 = 3*sum(B)\n\nn5 = N // 5\nC = list(range(n5+1))\nS5 = 5*sum(C)\n\nn15 = N // 15\nD = list(range(n15+1))\nS15 = 15*sum(D)\n\nprint(S-S3-S5+S15)']
['Wrong Answer', 'Accepted']
['s362958576', 's724173658']
[72048.0, 72228.0]
[97.0, 102.0]
[240, 220]
p02712
u363995337
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["N = int(input())\n\nif N % 15 == 0 :\n print('FuzzBuzz')\nelif N % 3 == 0:\n print('Fuzz')\nelif N % 5 == 0:\n print('Buzz')\nelse:\n print(N)", 'def isFizzBuzz (N):\n if N % 15 == 0 :\n return 0\n elif N % 3 == 0:\n return 0\n elif N % 5 == 0:\n return 0\n else:\n return N\n\nN = int(input())\nans = 0\nfor i in range(1,N+1):\n ans += isFizzBuzz(i)\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s422776407', 's489700460']
[9140.0, 9192.0]
[19.0, 244.0]
[137, 221]
p02712
u365491796
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['# 162 B\nN = int(input())\nans = 0\nfor i in range(1,N+1):\n if i % 3 != 0 and i %5 != 0:\n print(i)\n ans += i\n\nprint(ans)', '# 162 B\nN = int(input())\nans = 0\nfor i in range(1,N+1):\n if i % 3 != 0 and i %5 != 0:\n ans += i\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s699474907', 's742248444']
[9268.0, 9068.0]
[302.0, 158.0]
[134, 117]
p02712
u366886346
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\na=0\nfor i in range(1,n+1):\n if i%3==0:\n a+=0\n elif i%5==0:\n a+=0\n else:\n a+=i\nprint(i)\n', 'n=int(input())\na=0\nfor i in range(1,n+1):\n if i%3==0:\n a+=0\n elif i%5==0:\n a+=0\n else:\n a+=i\nprint(a)\n']
['Wrong Answer', 'Accepted']
['s673305523', 's678988441']
[9156.0, 9160.0]
[178.0, 168.0]
[132, 132]
p02712
u367147039
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\n\n\nans=0\nfor i in range(n):\n if (i+1)//3!=0 and (i+1)//5!=0:\n ans+=i+1\nprint(ans)\n', 'n=int(input())\n\n\nans=0\nfor i in range(n):\n if (i+1)%3!=0 and (i+1)%5!=0:\n ans+=i+1\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s467090227', 's778214507']
[9156.0, 9064.0]
[277.0, 196.0]
[106, 104]
p02712
u368657799
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\n\ns = [i for i in range(1,n+1)]\nprint(sum(s))', 'n = int(input())\n\ns = 0\nfor i in range(1,n+1):\n if i%15==0 or i%5==0 or i%3==0:\n pass\n else:\n s = s+i\n\nprint(s)']
['Wrong Answer', 'Accepted']
['s307124182', 's717520065']
[48532.0, 9080.0]
[84.0, 205.0]
[61, 131]
p02712
u373047809
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['print(len([i for i in range(1, int(input())+1) if i%3 and i%5]))', 'print(sum([i for i in range(1, int(input())+1) if i%3 and i%5]))']
['Wrong Answer', 'Accepted']
['s730020994', 's797212657']
[29992.0, 30056.0]
[95.0, 97.0]
[64, 64]
p02712
u373295322
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['m = int(input())\n\ndef fizz_buzz(i):\n fizz = i % 3\n buzz = i % 5\n \n return (fizz > 0) && (buzz > 1)\n\nres = 0\n\nfor i in range(m):\n use_i = i+1\n if fizz_buzz(use_i):\n res += use_i\n \nprint(res)', 'm = int(input())\n \ndef fizz_buzz(i):\n fizz = i % 3\n buzz = i % 5\n \n return (fizz > 0) & (buzz > 1)\n \nres = 0\n \nfor i in range(m):\n use_i = i+1\n if fizz_buzz(use_i):\n res += use_i', 'm = int(input())\n \ndef fizz_buzz(i):\n fizz = i % 3\n buzz = i % 5\n \n return (fizz > 0) & (buzz > 1)\n \nres = 0\n \nfor i in range(m):\n use_i = i+1\n if fizz_buzz(use_i):\n res += use_i\n \nprint(res)', ' m = int(input())\n \n def fizz_buzz(i):\n fizz = i % 3\n buzz = i % 5\n \n return (fizz > 0) && (buzz > 1)\n \n res = 0\n \n for i in range(m):\n use_i = i+1\n if fizz_buzz(use_i):\n res += use_i\n \n print(res)', 'm = int(input())\n \ndef fizz_buzz(i):\n fizz = i % 3\n buzz = i % 5\n \n return (fizz > 0) & (buzz > 0)\n \nres = 0\n \nfor i in range(m):\n use_i = i+1\n if fizz_buzz(use_i):\n res += use_i\n \nprint(res)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s229870436', 's266064801', 's420942253', 's795611186', 's227275672']
[9012.0, 9176.0, 9176.0, 9004.0, 9116.0]
[21.0, 271.0, 268.0, 22.0, 261.0]
[201, 187, 223, 268, 223]
p02712
u375193358
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\nsum = 0\nfor i in range(N):\n j = i + 1\n if (j % 3 != 0) and (j % 5 != 0):\n print(j)\n sum += j\n\nprint(sum)\n', 'N = int(input())\n\nsum = 0\nfor i in range(N):\n j = i + 1\n if (j % 3 != 0) and (j % 5 != 0):\n sum += j\n\nprint(sum)\n']
['Wrong Answer', 'Accepted']
['s231551202', 's573924531']
[9108.0, 9192.0]
[355.0, 200.0]
[143, 126]
p02712
u375253797
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\nsum = 0\n\nfor i in range(N):\n if not (i+1) % 3 == 0:\n if not (i+1) % 5 == 0:\n sum += i+1\n print(i+1)\nprint(sum)\n', 'N = int(input())\n\nsum = 0\n\nfor i in range(N):\n if not (i+1) % 3 == 0:\n if not (i+1) % 5 == 0:\n sum += i+1\n \nprint(sum)\n']
['Wrong Answer', 'Accepted']
['s501140814', 's428825693']
[9276.0, 9156.0]
[352.0, 195.0]
[161, 143]
p02712
u375681664
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\nsumm=0\nfor i in range(1,n):\n if i%3!=0 and i%5!=0:\n summ+=i\nprint(summ)n=int(input())\nsumm=0\nfor i in range(1,n):\n if i%3!=0 and i%5!=0:\n summ+=i\nprint(summ)\n', 'cnt=0\nn=int(input())\nfor i in range(1,n+1):\n if i%3!=0 and i%5!=0:\n cnt+=i\nprint(cnt)\n']
['Runtime Error', 'Accepted']
['s151536842', 's663149891']
[9016.0, 9084.0]
[21.0, 153.0]
[193, 96]
p02712
u378691508
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\nans=0\n\nfor i in range(N):\n if (N+1)% !=3 and (N+1)% !=5:\n ans+=i\nprint(ans)', 'n=int(input())\nsum=0\nfor i in range(1,n+1):\n if i%3!=0 and i%5 !=0:\n sum+=i\nprint(sum) \n']
['Runtime Error', 'Accepted']
['s789003821', 's821411637']
[8836.0, 9160.0]
[21.0, 145.0]
[94, 95]
p02712
u382639013
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\nl = list(range(0))\n\nfor i in range(N+1):\n if i % 3 == 0 and i % 5 == 0:\n pass\n elif i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n l.append(i)\n\nsum(l)', 'N = int(input())\n\nsum = 0\nfor i in range(1, N+1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n sum = sum + i\nprint(sum)']
['Wrong Answer', 'Accepted']
['s564421596', 's191420659']
[29856.0, 9172.0]
[227.0, 156.0]
[211, 138]
p02712
u385475040
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a = input()\nj = 0\nfor i in range(a):\n if i%3==0:\n continue\n if i%5==0:\n continue\n else:\n j+=i\nprint(j)', 'a = int(input())\nj = 0\nfor i in range(1, a + 1):\n if i%3!=0 and i%5!=0:\n print(i)\n j+=i\nprint(j)\n\n\n', 'a = long(input())\nj = 0\nfor i in range(a):\n if i%3==0:\n continue\n if i%5==0:\n continue\n else:\n j+=i\nprint(j)', 'a = int(input())\nj = 0\nfor i in range(a + 1):\n if i%3!=0 and i%5!=0:\n print(i)\n j+=i\nprint(j)', 'a = input()\nj = 0\nfor i in range(a):\n if i%3==0:\n continue\n if i%5==0:\n continue\n else:\n j+=i\nprint(j)\n\n', 'a = int(input())\nj = 0\nfor i in range(a + 1):\n if i%3!=0 and i%5!=0:\n j+=i\nprint(j)\n\n\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s022671482', 's118275678', 's240392908', 's668048901', 's951017088', 's204608514']
[9092.0, 9280.0, 9084.0, 9280.0, 9084.0, 9156.0]
[19.0, 308.0, 23.0, 312.0, 23.0, 154.0]
[132, 116, 138, 110, 134, 96]
p02712
u388297793
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\nans=0\nfor i in range(n):\n if i%3!=0 and i%5=!=0:\n ans=ans+i\nprint(ans)', 'n=int(input())\nans=0\nfor i in range(n):\n if i%3!=0 and i%5=!=0:\n ans+=i:\nprint(ans)', 'n=int(input())\nans=0\nfor i in range(n+1):\n if i%3!=0 and i%5!=0:\n ans+=i\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s299974241', 's598996421', 's485417456']
[8956.0, 8844.0, 9136.0]
[24.0, 25.0, 159.0]
[95, 93, 93]
p02712
u389091838
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['seq = raw_input()\n\ntotal = int(0)\nfor i in range(1, int(seq)+1, 1):\n if ((i % 3) != 0) & ((i % 5) != 0):\n total = total + i\nprint(total)\n', 'seq = raw_input()\n\ntotal = int(0)\nfor i in range(1, int(seq)+1, 1):\n if ((i % 3) != 0) and ((i % 5) != 0):\n total = total + i\nprint(total)\n', 'seq = int(raw_input())\n\nsum = 0\nfor i in range(1, seq+1, 1):\n if ((i % 3) != 0) & ((i % 5) != 0):\n sum = sum + i\nprint(sum)', 'seq = int(input())\n\ntotal = int(0)\nfor i in range(1, seq+1, 1):\n if ((i % 3) != 0) and ((i % 5) != 0):\n total = total + i\nprint(total)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s160515545', 's197628949', 's718439459', 's373085341']
[9076.0, 9056.0, 9080.0, 9148.0]
[20.0, 19.0, 20.0, 149.0]
[147, 149, 133, 145]
p02712
u391725895
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = input()\nSum = 0\n\nfor k in range(N):\n i = k+1\n\n if i % 3 != 0:\n if i % 5 != 0:\n Sum = Sum + i\n\nprint(Sum)', 'N = input()\nSum = 0\n\nfor k in range(N):\n i = k+1\n\n if i % 3 != 0 and i % 5 != 0:\n Sum = Sum + i\n\nprint(Sum)', 'N = input()\nSum = 0\n\nfor k in range(N):\n i = k+1\n\n if i % 3 != 0 and i % 5 != 0:\n Sum = Sum + i\n\nprint(str(Sum))', 'N = input()\nSum = 0\n\nfor k in range(int(N)):\n i = k+1\n\n if i % 3 != 0:\n if i % 5 != 0:\n Sum = Sum + i\n\nprint(Sum)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s201602703', 's539095908', 's594520469', 's440922050']
[9100.0, 9104.0, 9040.0, 9168.0]
[19.0, 21.0, 24.0, 195.0]
[132, 120, 125, 137]
p02712
u394731058
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\ns = 0\nfor i in range(n+1):\n if i % 3 != 0 or i % 5 != 0:\n s += i\nprint(s)', 'n = int(input())\ns = 0\nfor i in range(n+1):\n if i % 3 != 0 and i % 5 != 0:\n s += i\nprint(s)']
['Wrong Answer', 'Accepted']
['s413905370', 's123465754']
[9092.0, 9180.0]
[155.0, 157.0]
[94, 95]
p02712
u395202850
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["import sys\nimport math\nreadline = sys.stdin.readline\n\n\ndef main():\n n = int(readline().rstrip())\n allSum = n * (n + 1) // 2\n threeNum = math.floor(n / 3)\n threeSum = 3 * threeNum * (threeNum + 1) // 2\n fiveNum = math.floor(n / 5)\n fiveSum = 5 * fiveNum * (fiveNum + 1) // 2\n bothNum = math.floor(n / 15)\n bothSum = 15 * bothNum * (bothNum + 1) // 2\n print(allSum, bothSum, threeSum, fiveSum)\n print(allSum + bothSum - threeSum - fiveSum)\n\n\nif __name__ == '__main__':\n main()\n", "import sys\nimport math\nreadline = sys.stdin.readline\n\n\ndef main():\n n = int(readline().rstrip())\n allSum = n * (n + 1) // 2\n threeNum = math.floor(n / 3)\n threeSum = 3 * threeNum * (threeNum + 1) // 2\n fiveNum = math.floor(n / 5)\n fiveSum = 5 * fiveNum * (fiveNum + 1) // 2\n bothNum = math.floor(n / 15)\n bothSum = 15 * bothNum * (bothNum + 1) // 2\n print(allSum + bothSum - threeSum - fiveSum)\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s574457616', 's748600279']
[9204.0, 9204.0]
[20.0, 21.0]
[508, 462]
p02712
u396961814
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['for i in range(n):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)', 'n = int(input())\n\nans = 0\n\nfor i in range(1,n+1):\n if (i % 3 != 0) and (i % 5 != 0):\n ans += i\nprint(ans)']
['Runtime Error', 'Accepted']
['s704409086', 's211038343']
[9084.0, 9108.0]
[20.0, 157.0]
[80, 115]
p02712
u397638621
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = input()\na = 0\nfor i in range(1, N + 1):\n if i % 5 != 0 and i % 3 != 0:\n a += i\nprint(a)', 'k = int(input())\na = (1 + k) * k // 2\nthree = (3+3*(k//3)) * (k // 3) // 2\nfive = (5+5*(k//5)) * (k // 5) // 2\nfifteen = (15+15*(k//15)) * (k // 15) // 2\nprint(a-three-five+fifteen)']
['Runtime Error', 'Accepted']
['s199320953', 's630612128']
[9092.0, 9188.0]
[25.0, 22.0]
[101, 181]
p02712
u401686269
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\nsum_ = 0\nfor i in range(1,N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n sum_ += 1\nprint(sum_)', 'N=int(input())\nsum_ = 0\nfor i in range(1,N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n sum_ += i\nprint(sum_)']
['Wrong Answer', 'Accepted']
['s109087786', 's351495773']
[9104.0, 9012.0]
[156.0, 160.0]
[108, 108]
p02712
u402077280
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a = int(input())\n\nb = 0\n\nfor i in range(0,a):\n print(i)\n if i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n b += i\n\nprint(b)', 'a = int(input())\n\nb = 0\n\nfor i in range(0,a+1):\n if i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n b += i\n\nprint(b)\n']
['Wrong Answer', 'Accepted']
['s462757188', 's529145988']
[9772.0, 9160.0]
[428.0, 160.0]
[167, 157]
p02712
u414376763
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nfizzbuzz = 0\nfizz = 0\nbuzz = 0\n\nfor i in range(n):\n if i % 15 == 0:\n fizzbuzz += i\n elif i % 3 == fizz:\n fizz += i\n elif i % 5 == buzz:\n buzz += i\n\nprint(fizzbuzz + fizz +buzz)', 'n = int(input())\nans = 0\n\nfor i in range(1:n+1):\n if i % 5 != 0 and i % 3 !=0:\n ans += i\n\nprint(ans)', 'n = int(input())\nans = 0\n\nfor i in range(1,n+1):\n if i % 5 != 0 and i % 3 !=0:\n ans += i\n\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s285736475', 's860942420', 's369737362']
[9096.0, 8892.0, 9064.0]
[192.0, 29.0, 159.0]
[205, 104, 104]
p02712
u419874471
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['k = 0\nint n = int(input())\nfor i in range(n):\n if i % 3 != 0 and i % 5 != 0:\n k += i\n\nprint(k)', 'k = 0\nn = int(input())\nfor i in range(n+1):\n if i % 3 != 0 and i % 5 != 0:\n k += i\n \nprint(k)']
['Runtime Error', 'Accepted']
['s446663687', 's389485161']
[8856.0, 9112.0]
[20.0, 156.0]
[98, 97]
p02712
u421815567
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['if __name__ == "__main__":\n n = int(input())\n if "7" in str(n):\n print("Yes")\n else:\n print("No")\n', 'if __name__ == "__main__":\n n = int(input())\n\n sum_ = 0\n\n for i in range(n):\n num = i + 1\n if num % 3 == 0 or num % 5 == 0:\n continue\n else:\n sum_ += num\n\n print(sum_)\n']
['Wrong Answer', 'Accepted']
['s356022021', 's054749658']
[9160.0, 9184.0]
[19.0, 199.0]
[121, 223]
p02712
u423812170
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nlist = []\nfor i in range(1, N + 1):\n if i % 3 == 0 and i % 5 == 0:\n print("FizzBuzz")\n elif i % 3 == 0:\n print("Fizz")\n elif i % 5 == 0:\n print("Buzz")\n else:\n list.append(i)\nprint(sum(list))', 'N = int(input())\nlist = []\nfor i in range(1, N + 1):\n if i % 3 == 0 and i % 5 == 0:\n "FizzBuzz"\n elif i % 3 == 0:\n "Fizz"\n elif i % 5 == 0:\n "Buzz"\n else:\n list.append(i)\nprint(sum(list))']
['Wrong Answer', 'Accepted']
['s816723799', 's346684729']
[30032.0, 30032.0]
[324.0, 223.0]
[248, 227]
p02712
u425762225
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\ndef judge(x):\n if x % 15 == 0:\n return 0\n elif x % 3 == 0:\n return 0\n elif x % 5 == 0:\n return 0\n else:\n return x\n\nl =[]\ni = 0\nfor i in range(N):\n l.append(i)\n \nprint(sum(l))\n ', 'N = int(input())\n\ndef judge(x):\n if x % 15 == 0:\n return 0\n elif x % 3 == 0:\n return 0\n elif x % 5 == 0:\n return 0\n else:\n return x\n\nl =[]\nfor i in range(1,N+1):\n l.append(i)\n \nprint(sum(l))\n \n', 'N = int(input())\n\ndef judge(x):\n if x % 15 == 0:\n return 0\n elif x % 3 == 0:\n return 0\n elif x % 5 == 0:\n return 0\n else:\n return x\n\nl =[]\nfor i in range(1,N+1):\n l.append(judge(i))\n \nprint(sum(l))\n \n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s446677296', 's714871778', 's890981927']
[48408.0, 48500.0, 33744.0]
[147.0, 150.0, 288.0]
[213, 212, 219]
p02712
u426572476
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import sys\nimport heapq\nimport re\nfrom itertools import permutations\nfrom bisect import bisect_left, bisect_right\nfrom collections import Counter, deque\nfrom math import factorial, sqrt, gcd\nfrom functools import lru_cache, reduce\nINF = 1 << 60\nmod = 1000000007\nsys.setrecursionlimit(10 ** 7)\n\n# UnionFind\nclass UnionFind():\n def __init__(self, n):\n self.n = n\n self.parents = [-1] * n\n\n def find(self, x):\n if self.parents[x] < 0:\n return x\n else:\n self.parents[x] = self.find(self.parents[x])\n return self.parents[x]\n\n def union(self, x, y):\n x = self.find(x)\n y = self.find(y)\n\n if x == y:\n return\n\n if self.parents[x] > self.parents[y]:\n x, y = y, x\n\n self.parents[x] += self.parents[y]\n self.parents[y] = x\n\n def size(self, x):\n return -self.parents[self.find(x)]\n\n def same(self, x, y):\n return self.find(x) == self.find(y)\n\n def members(self, x):\n root = self.find(x)\n return [i for i in range(self.n) if self.find(i) == root]\n\n def roots(self):\n return [i for i, x in enumerate(self.parents) if x < 0]\n\n def group_count(self):\n return len(self.roots())\n\n def all_group_members(self):\n return {r: self.members(r) for r in self.roots()}\n\n def __str__(self):\n return \'\\n\'.join(\'{}: {}\'.format(r, self.members(r)) for r in self.roots())\n\n\ndef dijkstra_heap(s, edge, n):\n \n d = [10**20] * n\n used = [True] * n \n d[s] = 0\n used[s] = False\n edgelist = []\n for a,b in edge[s]:\n heapq.heappush(edgelist,a*(10**6)+b)\n while len(edgelist):\n minedge = heapq.heappop(edgelist)\n \n if not used[minedge%(10**6)]:\n continue\n v = minedge%(10**6)\n d[v] = minedge//(10**6)\n used[v] = False\n for e in edge[v]:\n if used[e[1]]:\n heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])\n return d\n\n\ndef factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr==[]:\n arr.append([n, 1])\n\n return arr\n\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\n\ndef lcm_list(numbers):\n return reduce(lcm, numbers, 1)\n\n\ndef gcd_list(numbers):\n return reduce(gcd, numbers)\n\n\nn = input()\nyes = False\nfor i in n:\n if i == "7":\n yes = True\n break\nif yes:\n print("Yes")\nelse:\n print("No")', "import sys\nimport heapq\nimport re\nfrom itertools import permutations\nfrom bisect import bisect_left, bisect_right\nfrom collections import Counter, deque\nfrom math import factorial, sqrt, gcd\nfrom functools import lru_cache, reduce\nINF = 1 << 60\nmod = 1000000007\nsys.setrecursionlimit(10 ** 7)\n\n# UnionFind\nclass UnionFind():\n def __init__(self, n):\n self.n = n\n self.parents = [-1] * n\n\n def find(self, x):\n if self.parents[x] < 0:\n return x\n else:\n self.parents[x] = self.find(self.parents[x])\n return self.parents[x]\n\n def union(self, x, y):\n x = self.find(x)\n y = self.find(y)\n\n if x == y:\n return\n\n if self.parents[x] > self.parents[y]:\n x, y = y, x\n\n self.parents[x] += self.parents[y]\n self.parents[y] = x\n\n def size(self, x):\n return -self.parents[self.find(x)]\n\n def same(self, x, y):\n return self.find(x) == self.find(y)\n\n def members(self, x):\n root = self.find(x)\n return [i for i in range(self.n) if self.find(i) == root]\n\n def roots(self):\n return [i for i, x in enumerate(self.parents) if x < 0]\n\n def group_count(self):\n return len(self.roots())\n\n def all_group_members(self):\n return {r: self.members(r) for r in self.roots()}\n\n def __str__(self):\n return '\\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())\n\n\ndef dijkstra_heap(s, edge, n):\n \n d = [10**20] * n\n used = [True] * n \n d[s] = 0\n used[s] = False\n edgelist = []\n for a,b in edge[s]:\n heapq.heappush(edgelist,a*(10**6)+b)\n while len(edgelist):\n minedge = heapq.heappop(edgelist)\n \n if not used[minedge%(10**6)]:\n continue\n v = minedge%(10**6)\n d[v] = minedge//(10**6)\n used[v] = False\n for e in edge[v]:\n if used[e[1]]:\n heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])\n return d\n\n\ndef factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr==[]:\n arr.append([n, 1])\n\n return arr\n\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\n\ndef lcm_list(numbers):\n return reduce(lcm, numbers, 1)\n\n\ndef gcd_list(numbers):\n return reduce(gcd, numbers)\n\n\nn = int(input())\nans = 0\nfor i in range(1, n + 1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s749038422', 's452483105']
[9784.0, 9988.0]
[26.0, 161.0]
[2957, 2937]
p02712
u430336181
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = input()\n\nlist = [i for i in range(1, N+1) if not (i % 3 == 0 or i % 5 ==0)]\nprint(sum(list))', 'N = int(input())\n\nlist = [i for i in range(1, N+1) if not (i % 3 == 0 or i % 5 ==0)]\nprint(list)\nprint(sum(list))', 'N = input()\n\nlist = [i for i in range(1, N+1) if (i % 3 != 0 or i % 5 !=0)]\nprint(sum(list))', 'N = int(input())\n\nlist = [i for i in range(1, N+1) if not (i % 3 == 0 or i % 5 ==0)]\n\nprint(sum(list))']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s215491288', 's589414516', 's606793441', 's311181627']
[9120.0, 38328.0, 9032.0, 29856.0]
[23.0, 157.0, 23.0, 116.0]
[96, 113, 93, 102]
p02712
u433136867
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import sys\nimport numpy as np\n\nN=int(input())\nA=np.arange(N+1)\ncount = 0\n\nfor i in range(N+1):\n if A[i]%3 != 0 and A[i]%5 != 0 and A[i]%15 != 0:\n count = count + A[i]\n print(A[i])\nprint(count)', 'import sys\nimport numpy as np\n\nN=int(input())\nA=np.arange(N+1)\ncount = 0\n\nfor i in range(N+1):\n if A[i]%3 != 0 and A[i]%5 != 0 and A[i]%15 != 0:\n count = count + A[i]\nprint(count)\n']
['Wrong Answer', 'Accepted']
['s014244062', 's056028755']
[34376.0, 34608.0]
[1735.0, 1349.0]
[209, 190]
p02712
u434296044
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\n\nfor i in range(1,N+1):\n if i%3==0 or i%5==0 or i%15==0:\n continue\n cal+=i\n\nprint(cal)\n', 'N=int(input())\ncal=0\nfor i in range(1,N+1):\n if i%3==0 or i%5==0 or i%15==0:\n continue\n cal+=i\n\nprint(cal)\n']
['Runtime Error', 'Accepted']
['s698083913', 's998341228']
[9068.0, 9164.0]
[147.0, 170.0]
[119, 120]
p02712
u438189153
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=map(int,input().split())\nnum=0\nfor i in range(n):\n if (i%3!=0) and (i%5!=0):\n num+=i\nprint(num)\n', 'n=map(int,input().split())\nfor i in range(n):\n if (i%3==0) and (i%5==0):\n print("FizzBuzz")\n elif (i%3==0) and (i%5!=0):\n print("Fizz")\n elif (i%3!=0) and (i%5==0):\n print("Buzz")\n else:\n print(i)\n \n', 'n=int(input())\nnum=0\nfor i in range(1,n+1):\n if (i%3!=0) and (i%5!=0):\n num+=i\nprint(num)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s279913747', 's343550510', 's579344233']
[9084.0, 9100.0, 9148.0]
[26.0, 32.0, 154.0]
[108, 242, 100]
p02712
u440113208
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\nsum=N*(N+1)/2\nfor i in range(N+1):\n if i%3==0 or i%5==0:\n sum-=i\nprint(sum) ', 'N=int(input())\nsum=N*(N+1)/2\nfor i in range(N):\n if i%3==0 or i%5==0:\n sum-=i\nprint(sum) ', 'N=int(input())\nsum=N*(N+1)/2\nfor i in range(N+1):\n if i%3==0 or i%5==0:\n sum-=i\nprint(int(sum)) ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s561758178', 's786113491', 's118187336']
[9164.0, 9172.0, 9172.0]
[150.0, 150.0, 156.0]
[107, 100, 112]
p02712
u445978065
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(iniput())\nsm = 0\nfor i in range(1,n+1,1):\n if i%3 and i%5:\n sm+=i\nprint(sm)', 'n = int(input())\nsm = 0\nfor i in range(1,n+1,1):\n if i%3 and i%5:\n sm+=i\nprint(sm)']
['Runtime Error', 'Accepted']
['s057910539', 's911472616']
[9116.0, 9184.0]
[20.0, 143.0]
[87, 86]
p02712
u446711904
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\ns=[]\nfor i in range(1:n+1):\n if a%3==0:\n continue\n elif a%5==0:\n continue\n else\n \ts.append(i)\nprint(sum(s))', 'n=int(input())\ns=[]\nfor i in range(1,n+1):\n if i%3==0:\n continue\n elif i%5==0:\n continue\n else:\n s.append(i)\nprint(sum(s))']
['Runtime Error', 'Accepted']
['s234090124', 's431405013']
[8924.0, 29892.0]
[22.0, 172.0]
[132, 134]
p02712
u448747186
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['\nN = input()\nN = int(N)\n\ns_all = sum(N)\nfizz = sum(list(range(3,N,3)))\nbuzz = sum(list(range(5,N,5)))\n\nfb = sum(list(range(15,N,15)))\n\nprint(s_all-fizz-buzz+fb)\n', '\nN = input()\nN = int(N)\n\ns_all = sum(range(N+1))\nfizz = sum(list(range(3,N+1,3)))\nbuzz = sum(list(range(5,N+1,5)))\n\nfb = sum(list(range(15,N+1,15)))\n\nprint(s_all-fizz-buzz+fb)\n']
['Runtime Error', 'Accepted']
['s814290364', 's589794137']
[9200.0, 22080.0]
[23.0, 64.0]
[161, 176]
p02712
u450147945
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\ncnt += 0\nfor i in range(N):\n if i%5!=0 and i%3!=0:\n cnt += i\nprint(cnt)', 'N = int(input())\ncnt = 0\nfor i in range(N+1):\n if i%5!=0 and i%3!=0:\n cnt += i\nprint(cnt)']
['Runtime Error', 'Accepted']
['s993559678', 's071189693']
[9104.0, 9164.0]
[21.0, 162.0]
[92, 99]
p02712
u453623947
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\n\nthree = (3+(n//3)*3) * (n//3)/2\nfive = (5+(n//5)*5) * (n//5)/2\ncup = (15+(n//15)*15) * (n//15)/2\ntotal = (1+n) * n/2\n\nans = total - three - five + cup\n\nprint(ans)\n', 'n = int(input())\n\nthree = (3+(n//3)*3) * (n//3)/2\nfive = (5+(n//5)*5) * (n//5)/2\ncup = (15+(n//15)*15) * (n//15)/2\ntotal = (1+n) * n/2\n\nans = total - three - five + cup\n\nprint(ans//1)\n', 'n = int(input())\n\nthree = (3+(n//3)*3) * (n//3)/2\nfive = (5+(n//5)*5) * (n//5)/2\ncup = (15+(n//15)*15) * (n//15)/2\ntotal = (1+n) * n/2\n\nans = total - three - five + cup\n\nprint(int(ans))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s202763166', 's327685983', 's845662894']
[9180.0, 9244.0, 9180.0]
[21.0, 22.0, 22.0]
[181, 184, 186]
p02712
u454866339
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["n = int(input())\nlist = []\n\nfor i in range(1, n + 1):\n if i % 3 == 0 and i % 5 == 0:\n print('FizzBuzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 ==0 :\n print('Buzz')\n else:\n list.append(i)\n\nprint(sum(list))", "n = int(input())\nlist = []\n\nfor i in range(1, n + 1):\n if i % 3 == 0 and i % 5 == 0:\n 'FizzBuzz'\n elif i % 3 == 0:\n 'Fizz'\n elif i % 5 ==0 :\n 'Buzz'\n else:\n list.append(i)\n\nprint(sum(list))"]
['Wrong Answer', 'Accepted']
['s787022384', 's663837937']
[29888.0, 29908.0]
[321.0, 216.0]
[250, 229]
p02712
u457901067
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nans = 0\nfor i in range(1,N+1):\n if i%3 == 0 or i%5 == 0:\n continue\n ans += i\n \nprint(i)', 'N = int(input())\nans = 0\nfor i in range(1,N+1):\n if i%3 == 0 or i%5 == 0:\n continue\n ans += i\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s628500403', 's823551520']
[9132.0, 9116.0]
[155.0, 157.0]
[110, 112]
p02712
u458396858
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["from sys import stdin\n\ndef main():\n N = int(stdin.readline())\n print(sum([n for n in range(1, N+1) if (n%3 != 0) or (n%5 != 0)]))\n \nif __name__ == '__main__':\n main()\n ", "from sys import stdin\n\ndef main():\n N = int(stdin.readline())\n print(sum([n for n in range(1, N+1) if (n%3 != 0) and (n%5 != 0)]))\n \nif __name__ == '__main__':\n main()\n \n"]
['Wrong Answer', 'Accepted']
['s103624066', 's733104757']
[45848.0, 29980.0]
[117.0, 102.0]
[173, 175]
p02712
u459511441
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\nS = []\nfor i in range(1, N + 1):\n if (i % 3 == 0) and (i % 5 == 0):\n "FizzBuzz"\n elif i % 3 == 0:\n "Fizz"\n elif i % 5 == 0:\n "Buzz"\n else:\n S.append(i)\n print(sum(S))\n', 'N = int(input())\nS = 0\n\nfor i in range(1, N + 1):\n if i % 15 == 0:\n S += 0\n elif i % 3 == 0:\n S += 0\n elif i % 5 == 0:\n S += 0\n else:\n S += i\nprint(S)\n']
['Wrong Answer', 'Accepted']
['s343800803', 's444280904']
[10344.0, 9096.0]
[2206.0, 212.0]
[231, 191]
p02712
u459689470
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = (int(input()))\nsum = 0\nfor i in range(n):\n if not((i+1)%3 == 0 or (i+1)%5 == 0):\n sum += i+1\n print(i+1)\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(n):\n if not((i+1)%3 == 0 or (i+1)%5 == 0):\n sum += i+1\nprint(sum)']
['Wrong Answer', 'Accepted']
['s161332140', 's283930634']
[9284.0, 9104.0]
[368.0, 197.0]
[126, 109]
p02712
u465652095
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = input(int())\nfor i in range(1, N+1):\n if i % 15 == 0:\n i = "FizzBuzz"\n elif i % 3 == 0:\n i = "Fizz"\n elif i % 5 == 0:\n i = "Buzz"\n else:\n i = i\n print(sum(i))', 'N = int(input())\ntotal = 0\nfor i in range(1, N+1):\n if (i % 3) != 0 and (i % 5) != 0:\n total = total+i\nprint(total)']
['Runtime Error', 'Accepted']
['s708893009', 's969909921']
[9064.0, 9100.0]
[25.0, 158.0]
[209, 125]
p02712
u465900169
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['A = int(input())\ntotal = 0L\nfor x in range(A+1):\n if x%5!=0 and x%3!=0:\n total += x\nprint(x)', 'A = int(input())\ntotal = 0\nfor x in range(A+1):\n if x%5!=0 and x%3!=0:\n total += x\nprint(total)\n\n']
['Runtime Error', 'Accepted']
['s528076394', 's636664954']
[8948.0, 9152.0]
[21.0, 159.0]
[96, 101]
p02712
u468206018
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['import math\nn = int(input())\na = n//3\nans = ((a+1)*a//2)*3 \nb = n//5\nans += ((b+1)*b//2)*5\nprint(ans)', 'n=int(input())\na=n//3\nans=(a+1)*a//2*3\nb=n//5\nans+=(b+1)*b//2*5\nc=n//15\nans-=(c+1)*c//2*15\nans=(n+1)*n//2-ans\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s359358779', 's730353183']
[9164.0, 9172.0]
[21.0, 20.0]
[102, 121]
p02712
u470560351
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = str(input())\n\nans = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)', 'N = int(input())\n \nans = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)']
['Runtime Error', 'Accepted']
['s255969900', 's727611995']
[9100.0, 9160.0]
[19.0, 153.0]
[105, 106]
p02712
u470678640
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
["for i in range(1, 30 + 1):\n if i % 15 == 0:\n print('Fizz Buzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n print(i) ", "N = int(input())\nresult = 0\nfor i in range(1, (N + 1)):\n if i % 15 == 0:\n 'Fizz Buzz'\n elif i % 3 == 0:\n 'Fizz'\n elif i % 5 == 0:\n 'Buzz'\n else:\n result = result + i\nprint(result)\n"]
['Wrong Answer', 'Accepted']
['s882576503', 's461737467']
[8848.0, 9168.0]
[29.0, 193.0]
[187, 220]
p02712
u474122160
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['a=int(input())\nc=0\nfor i in range(0,n+1):\n\tif(i%3!=0)and(i%5==0):\n\t\tcontinue\n if(i%3!=0):\n \tcontinue\n if(i%5==0):\n \tcontinue\n \telse:\n \tc+=i\nprint(c) \n \n', 'n=int(input())\nfor i in range(1,n+1):\n if((i%3==0)and(i%5==0)):\n continue\n elif(i%3==0):\n continue\n elif((i%5==0)):\n continue\n else:\n c+=i\nprint(c)\n ', 'a=int(input())\nc=0\nfor i in range(0,a+1):\n\tif(i%3!=0)and(i%5==0):\n\t\tcontinue\n if(i%3!=0):\n \tcontinue\n if(i%5==0):\n \tcontinue\n \telse:\n \tc+=i\nprint(c) \n \n', 'a=int(input())\nc=0\nfor i in range(0,n+1):\n if(i%3!=0)and(i%5==0):\n continue\n if(i%3!=0):\n continue\n if(i%5==0):\n continue\n else:\n c+=i\nprint(c) \n ', 'a=int(input())\nc=0\nfor i in range(0,n+1):\n\tif(i%3!=0)and(i%5==0):\n\t\tcontinue\n if(i%3!=0):\n \tcontinue\n if(i%5==0):\n \tcontinue\n \telse:\n \tc+=i\nprint(c) \n \n', 'n=int(input())\nc=0\nfor i in range(1,n+1):\n if((i%3==0)and(i%5==0)):\n continue\n elif(i%3==0):\n continue\n elif((i%5==0)):\n continue\n else:\n c+=i\nprint(c)\n \n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s122769906', 's507126826', 's816162353', 's838811113', 's899426763', 's883175700']
[9020.0, 9164.0, 8960.0, 9172.0, 9020.0, 9100.0]
[20.0, 21.0, 21.0, 21.0, 19.0, 190.0]
[171, 166, 171, 165, 171, 171]
p02712
u479638406
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\n\ncnt = 0\nfor i in range(1, n):\n if i%3 != 0 and i%5 != 0:\n cnt += 1\n \nprint(cnt)\n', 'n = int(input())\n\ncnt = 0\nfor i in range(1, n):\n if i%3 != 0 and i%5 != 0:\n cnt += 1\n \nprint(cnt)', 'n = int(input())\n\ncnt = 0\nfor i in range(1, n+1):\n if i%3 != 0 and i%5 != 0:\n cnt += i\n\nprint(cnt)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s486600044', 's544327921', 's863684101']
[9152.0, 9160.0, 9156.0]
[142.0, 145.0, 151.0]
[105, 104, 103]
p02712
u479674982
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\na = 0\nfor i in range(N):\n x =i+1\n if x%3!=0 andx%5!=0:\n a+=x\nprint(x)', 'N = int(input())\na = 0\nfor i in range(N):\n x =i+1\n if x%3!=0 and x%5!=0:\n a+=x\nprint(a)']
['Runtime Error', 'Accepted']
['s536954042', 's853966815']
[9020.0, 9156.0]
[20.0, 209.0]
[91, 92]
p02712
u479732368
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['total = 0\nfor i in range(int(input())):\n if (i+1 % 3 != 0) and (i+1 % 5 != 0):\n total += i+1\n \nprint(total)', 'n = [int(i+1) for i in range(input())]\n\ntotal = 0\nfor i in n:\n \tif (n % 3 =! 0) and (n % 5 =! 0):\n \ttotal += i\n \nprint(total)', 'total = 0\nfor i in range(int(input())):\n if int((i+1) % 3) != 0:\n if int((i+1) % 5) != 0:\n \ttotal += i+1\n \nprint(total)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s068074444', 's351921684', 's570582633']
[9148.0, 9028.0, 9152.0]
[239.0, 21.0, 308.0]
[118, 138, 133]
p02712
u479788474
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['# 1 <= N <= 1000000\nN = int(input())\n\ntotal = []\n\nfor x in range(1, N+1):\n if not(x % 15 == 0 and x % 5 == 0 and x % 3 == 0):\n total.append(x)\n print(sum(total))\n ', '# 1 <= N <= 1000000\nfor i in range(0, 100001):\n if i % 3 and i % 5 == 0:\n print("FizzBuzz")\n elif i % 3 == 0:\n print("Fizz")\n elif i % 5 == 0:\n print("Buzz")\n else:\n print(i)\n\n\n', 'N = int(input())\n# 1 <= N <= 1000000\n\nfor N in range(0, 100001):\n if N % 3 and N % 5 == 0:\n print("FizzBuzz")\n elif N % 3 == 0:\n print("Fizz")\n elif N % 5 == 0:\n print("Buzz")\n else:\n print(N)\n\n\n', '# 1 <= N <= 1000000\nN = int(input())\n\ntotal = []\n\nfor x in range(1, N+1):\n if not(x % 15 == 0 or x % 5 == 0 or x % 3 == 0):\n total.append(x)\n print(sum(total))\n', '# 1 <= N <= 1000000\nN = int(input())\n\ntotal = []\n\n\nfor x in range(1, N+1):\n if x % 15 == 0:\n "FizzBuzz"\n elif x % 5 == 0:\n "Buzz"\n elif x % 3 == 0:\n "Fizz"\n else:\n print(total)\n total.append(x) \nprint(sum(total))', '# 1 <= N <= 1000000\nN = int(input())\n\ntotal = []\n\n\nfor x in range(1, N+1):\n if x % 15 == 0:\n "FizzBuzz"\n elif x % 5 == 0:\n "Buzz"\n elif x % 3 == 0:\n "Fizz"\n else:\n print(total)\n total.append(x) \nprint(sum(total))\n', '# 1 <= N <= 1000000\nfor i in range(1, 10000):\n if i % 3 and i % 5 == 0:\n print("FizzBuzz")\n elif i % 3 == 0:\n print("Fizz")\n elif i % 5 == 0:\n print("Buzz")\n else:\n print(i)\n\n\n', '# 1 <= N <= 1000000\nN = int(input())\n\nfor i in range(0, N+1):\n if i % 15 == 0:\n print("FizzBuzz")\n elif i % 3 == 0:\n print("Fizz")\n elif i % 5 == 0:\n print("Buzz")\n else:\n print(i)\n\n\n\n', '# 1 <= N <= 1000000\nN = int(input())\n\ntotal = []\n\n\nfor x in range(1, N+1):\n if x % 15 == 0:\n "FizzBuzz"\n elif x % 5 == 0:\n "Buzz"\n elif x % 3 == 0:\n "Fizz"\n else:\n total.append(x) \nprint(sum(total))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s040514350', 's204694299', 's281095524', 's297415371', 's687789356', 's874349364', 's888030670', 's890334230', 's006909967']
[10316.0, 9052.0, 9156.0, 10212.0, 139500.0, 139520.0, 9148.0, 9264.0, 30012.0]
[2206.0, 71.0, 70.0, 2206.0, 1598.0, 1602.0, 34.0, 411.0, 215.0]
[187, 234, 252, 177, 371, 372, 233, 241, 350]
p02712
u480766273
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['# 1 <= N <= 1000000\nN = int(input())\n \ntotal = []\n \nfor x in range(1, N+1):\n if not(x % 15 == 0 or x % 5 == 0 or x % 3 == 0):\n total.append(x)\n print(sum(total))', 'N = int(input())\nsum = 0\n\nfor i in range(1, N + 1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n\nprint(sum)']
['Wrong Answer', 'Accepted']
['s032854887', 's290147553']
[10336.0, 9168.0]
[2206.0, 163.0]
[178, 114]
p02712
u482883507
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n=int(input())\nn3=n//3\ns3=((n3)*3)(n3+1)//2\nn5=n//5\ns5=((n5)*5)(n5+1)//2\nn15=n//15\ns15=((n15)*15)(n15+1)//2\n\ns=n*(n+1)//2\ns=s-s3-s5+s15\nprint(s)', 'n=int(input())\nn3=n//3\ns3=(n3*3)*(n3+1)//2\nn5=n//5\ns5=((n5)*5)*(n5+1)//2\nn15=n//15\ns15=((n15)*15)*(n15+1)//2\n \ns=n*(n+1)//2\ns=s-s3-s5+s15\nprint(s)']
['Runtime Error', 'Accepted']
['s243364123', 's375233269']
[9180.0, 9116.0]
[22.0, 22.0]
[144, 146]
p02712
u483391772
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = 1000000#int(input())\na = list(range(1,N+1))\nN_3 = N//3\nN_5 = N//5\nfor i in range(1,N_3+1):\n a[3*i-1] = 0\nfor i in range(1,N_5+1):\n a[5*i-1] = 0\nprint(sum(a))', 'N = int(input())\na = list(range(1,N+1))\nN_3 = N//3\nN_5 = N//5\nfor i in range(1,N_3+1):\n a[3*i-1] = 0\nfor i in range(1,N_5+1):\n a[5*i-1] = 0\nprint(sum(a))']
['Wrong Answer', 'Accepted']
['s877962713', 's343372783']
[48352.0, 48364.0]
[150.0, 148.0]
[167, 159]
p02712
u484052148
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['ans = 0\nfor i in range(1, n):\n if 0 != i%3 and 0 != i%5:\n ans += i\nprint(ans)', 'n = int(input())\nans = 0\nfor i in range(1, n):\n if (0 != i%3) or (0 != i%5):\n ans += i\nprint(ans)', 'ans = 0\nfor i in range(int(input())+1):\n if i%3 != 0 and i%5 != 0:\n ans += i\nprint(ans)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s082260078', 's594945225', 's627855548']
[9036.0, 9168.0, 9172.0]
[20.0, 155.0, 165.0]
[87, 107, 97]
p02712
u486297080
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\nsum = 0\nfor i in range(N):\n if i % 3 == 0 and i % 5 == 0:\n continue\n elif i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n sum += i\n\nprint(i)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n if i % 3 == 0 and i % 5 == 0:\n continue\n elif i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n total += i\n \n\nprint(total)']
['Wrong Answer', 'Accepted']
['s080826149', 's031571021']
[9160.0, 9176.0]
[200.0, 206.0]
[184, 224]
p02712
u490489966
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['#B\nn = int(input())\nans=0\nfor i in range(1, n + 1):\n if i % 3 == 0 or i % 5 == 0:\n ans += i\n print(i)\nprint(ans)\n', '#B\nn = int(input())\nans=0\nfor i in range(1, n + 1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)']
['Wrong Answer', 'Accepted']
['s784695316', 's218833116']
[9216.0, 9164.0]
[395.0, 142.0]
[130, 113]
p02712
u491762407
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\ns = 0\nfor i in range(1,N+1):\n if i % 3 != 0 and i % 5 != 0:\n s += i\nprint(s)', 'n = int(input())\ns = 0\nfor i in range(1,n+1):\n if i % 3 != 0 and i % 5 != 0:\n s += i\nprint(s)']
['Runtime Error', 'Accepted']
['s249173052', 's542305484']
[9000.0, 9044.0]
[20.0, 146.0]
[99, 99]
p02712
u493318999
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nsum = 0\nfor i in range(n):\n if n%3!==0 and n%5!==0:\n sum += i\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(n+1):\n if (i%3)!=0 and (i%5)!=0:\n sum += i\nprint(sum)']
['Runtime Error', 'Accepted']
['s322108059', 's750819140']
[8948.0, 9164.0]
[20.0, 147.0]
[93, 103]
p02712
u497188176
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\nB=0\nfor i in range(N):\n if (i+1)%3!=0 and (i+1)%5!=0:\n B=i+B\n \nprint(B)\n \n \n \n \n', 'N=int(input())\nB=0\nfor i in range(N):\n if (i+1)%3!=0 and (i+1)%5==0:\n B=i+B\n \nprint(B)\n \n \n \n \n', 'N=int(input())\nB=0\nfor i in range(N):\n if (i+1)%3!=0 and (i+1)%5==0:\n B=i+B\n print(B)\n \n \n \n ', 'N=int(input())\nB=0\nfor i in range(N):\n if (i+1)%3!=0 and (i+1)%5!=0:\n B=i+1+B\n \nprint(B)\n \n \n \n \n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s409763200', 's433091620', 's621957927', 's652889650']
[9164.0, 9096.0, 9236.0, 9164.0]
[192.0, 161.0, 211.0, 211.0]
[139, 139, 137, 141]
p02712
u498583807
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\ns = 0\nfor i in range(1,N+1):\n if i%3 != 0 and i%5 != 0:\n s += i\n print(s)', 'N = int(input())\ns = 0\nfor i in range(1,N+1):\n if i%3 != 0 and i%5 != 0:\n s += i\nprint(s)']
['Wrong Answer', 'Accepted']
['s227386850', 's124692075']
[14872.0, 9116.0]
[474.0, 148.0]
[103, 99]
p02712
u504256702
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input())\n\nans = 0\nfor i in range(1, N + 1):\n if i % 3 !=0 and i %5 != 0:\n ans +=1\nprint(ans)', 'N = int(input())\n \nans = 0\nfor i in range(1, N + 1):\n if i % 3 !=0 and i %5 != 0:\n ans +=i\nprint(ans)']
['Wrong Answer', 'Accepted']
['s940778556', 's636776435']
[9168.0, 9168.0]
[148.0, 150.0]
[104, 106]
p02712
u505025514
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\n\ntotal = 0\n\nfor i in range(n):\n if (i+1)%3 != 0 and (i+!)%5 != 0:\n total += i+1\n \nprint(total)', 'n = int(input())\n\ntotal = 0\n\nfor i in range(n):\n if (i+1)%3 != 0 and (i+1)%5 != 0:\n total += i+1\n \nprint(total)']
['Runtime Error', 'Accepted']
['s574227415', 's112881305']
[9024.0, 9168.0]
[22.0, 190.0]
[118, 118]
p02712
u505181116
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['n = int(input())\nsum = 0\nfor i in range(n):\n if i%3 == 0:\n elif i%5 == 0:\n else:\n sum += i\nprint(sum)\n', 'n = int(input())\nsum = 0\nfor i in range(n+1):\n if i%3 == 0 or i%5 == 0:\n sum += 0\n else:\n sum += i\nprint(sum)\n']
['Runtime Error', 'Accepted']
['s719388275', 's845646971']
[8944.0, 9156.0]
[19.0, 169.0]
[108, 118]
p02712
u506549878
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['s = int(input())\nsum = 0\nfor i in range(1,s+1):\n if i!3 == 0 and i!5 == 0:\n i == 0\n elif i!3 or i!5==0:\n i ==0\n else:\n sum += i\nprint(sum) ', 's = int(input())\nsum = 0\nfor i in range(1,s+1):\n if i%3 == 0 and i%5 == 0:\n j=0\n elif i%3==0 or i%5==0:\n j=0\n else:\n \n sum += i\nprint(sum) ']
['Runtime Error', 'Accepted']
['s807354273', 's678230520']
[9020.0, 9024.0]
[19.0, 210.0]
[154, 177]
p02712
u508061226
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N = int(input());\nsum = 0;\n\nfor i in range(N):\n num = i + 1;\n if num % 3 != 0 and num % 5 !=0:\n sum += num;\n else:\n pass;\n\nprint(num)', 'N = input();\nsum = 0;\n\nfor i in range(N):\n num = i + 1;\n if num % 3 != 0 and num % 5 !=0:\n sum += num;\n else:\n pass;\n\nprint(num)\n \n ', 'N = int(input());\nsum = 0;\n\nfor i in range(N):\n num = i + 1;\n if num % 3 != 0 and num % 5 !=0:\n sum += num;\n else:\n pass;\n\nprint(sum)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s532403776', 's674432971', 's379568571']
[9168.0, 9032.0, 9100.0]
[206.0, 20.0, 194.0]
[142, 146, 143]
p02712
u508164527
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['zinput = int(input())\na = []\nb = []\ni = 1\nwhile(i <= input):\n if i%3 == 0 and i%5 == 0:\n a[i] = "FizzBuzz"\n elif i%3 == 0:\n a[i] = "Fizz"\n elif i%5 == 0:\n a[i] = "Buzz"\n else:\n a[i] = "i"\n i += 1\nsum = 0\nfor j in a:\n if a[j] != "FizzBuzz" and a[j] != "Fizz" and a[j] != "Buzz":\n sum = sum + int(a[j])\nprint(sum)\n\n', 'input = int(input())\na = []\ni = 1\nwhile(i <= input):\n if i%3 == 0 and i%5 == 0:\n a[i] = FizzBuzz\n elif i%3 == 0:\n a[i] = Fizz\n elif i%5 == 0:\n a[i] = Buzz\n else:\n a[i] = i\n i += 1\nsum = 0\nfor j in a:\n if a[i] != "Fizz" and a[i] != "Buzz" and a[i] != "FizzBuzz":\n sum = sum + a[i]\nprint(sum)', 'input = int(input())\na = []\ni = 1\nwhile(i <= input):\n if i%3 == 0 and i%5 == 0:\n a[i] = FizzBuzz\n elif i%3 == 0:\n a[i] = Fizz\n elif i%5 == 0:\n a[i] = Buzz\n else:\n a[i] = i\n i += 1\nsum = 0\nfor j in a:\n if a[j] != "Fizz" and a[j] != "Buzz" and a[j] != "FizzBuzz":\n sum = sum + a[j]\nprint(sum)\n', 'input = int(input())\na = []\nwhile(i <= input):\n if i%3 == 0 or i%5 == 0:\n pass\n else:\n a.append(i)\n i += 1\nsum = 0\nfor j in a:\n sum = sum + a[j]\nprint(sum)\n\n', 'input = int(input())\na = []\nwhile(i <= input):\n if i%3 == 0 or i%5 == 0:\n pass\n else:\n a.append(i)\n i += 1\n\nprint(sum(a))\n\n', 'zinput = int(input())\na = []\nb = []\ni = 1\nwhile(i <= input):\n if i%3 == 0 and i%5 == 0:\n a[i] = "FizzBuzz"\n elif i%3 == 0:\n a[i] = "Fizz"\n elif i%5 == 0:\n a[i] = "Buzz"\n else:\n a[i] = i\n b.append(i)\n i += 1\nsum = 0\nfor j in a:\n sum = sum + b[j]\nprint(sum)\n\n', 'input = input()\na = []\ni = 1\nwhile(i <= int(input)):\n if i%3 == 0 or i%5 == 0:\n pass\n else:\n a.append(i)\n i += 1\nres = 0\nfor j in a:\n res = res + j\nprint(res)\n\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s120409456', 's290277704', 's363819598', 's441198810', 's736815188', 's969818655', 's656786999']
[9200.0, 9104.0, 9196.0, 9168.0, 9148.0, 9192.0, 29992.0]
[22.0, 22.0, 22.0, 23.0, 20.0, 21.0, 370.0]
[334, 311, 312, 169, 146, 280, 184]
p02712
u508842013
2,000
1,048,576
Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
['N=int(input())\nFi=N//3\nBu=N//5\nFiBu=N//15\ndef ans(x):\n return x*(x+1)/2\nprint(ans(N)-ans(Fi)*3-ans(Bu)*5+ans(FiBu)*15)', 'N=int(input())\nFi=N//3\nBu=N//5\nFiBu=N//15\ndef ans(x):\n return x*(x+1)//2\nprint(ans(N)-ans(Fi)*3-ans(Bu)*5+ans(FiBu)*15)']
['Wrong Answer', 'Accepted']
['s250261792', 's719244088']
[9176.0, 9176.0]
[23.0, 21.0]
[121, 122]