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
u708019102
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 range1,(N+1):\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', 'Accepted']
['s214713197', 's829866867']
[9192.0, 9168.0]
[23.0, 142.0]
[105, 103]
p02712
u708890186
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(1,N+1):\n if i%3==0:\n continue\n if i%5==0:\n continue\n if i%15==0:\n continue\n else:\n cnt+=i\nprint(cnt)', 'N=int(input())\ncnt=0\nfor i in range(1,N+1):\n if i%3==0:\n continue\n if i%5==0:\n continue\n if i%15==0:\n continue\n else:\n cnt+=i\nprint(cnt)\n']
['Runtime Error', 'Accepted']
['s366293581', 's071527315']
[8944.0, 9188.0]
[19.0, 183.0]
[153, 153]
p02712
u715396242
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()\naList = []\nfor i in range(1,int(a)+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 aList.append(i)\n print(i)\nans = 0\nfor _,b in enumerate(aList):\n ans = ans + b\nprint(ans)\n", 'a = input()\naList = []\nfor i in range(1,int(a)+1):\n if i%3 == 0 and i%5 == 0:\n pass\n \n elif i%3 == 0:\n pass\n \n elif i%5 == 0:\n pass\n \n else:\n aList.append(i)\n # print(i)\nans = 0\nfor _,b in enumerate(aList):\n ans = ans + b\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s564096685', 's026054617']
[30356.0, 30172.0]
[561.0, 269.0]
[306, 353]
p02712
u719270674
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(1, 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 sum = sum + i\n\nprint(sum)', 'N = int(input())\nsum = 0\n\nfor i in range(1, 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 sum = sum + i\n\nprint(sum)', 'N = int(input())\nsum = 0\n\nfor i in range(1, N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n sum = sum + i\n\nprint(sum)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s551566131', 's754061685', 's933380906']
[9308.0, 9328.0, 9040.0]
[456.0, 461.0, 165.0]
[242, 242, 121]
p02712
u720314082
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%5==0) and !(i%3==0):\n 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)']
['Runtime Error', 'Accepted']
['s446198837', 's642396632']
[9020.0, 9160.0]
[22.0, 159.0]
[99, 95]
p02712
u722148122
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 math import gcd\n \nk = int(input())\nsum_ = 0\nfor a in range(1, k + 1):\n for b in range(1, k + 1):\n gcd_ab = gcd(a, b)\n for c in range(1, k + 1):\n sum_ += gcd(c, gcd_ab)\nprint(sum_)', 'from collections import defaultdict, Counter\nfrom heapq import heapify, heappop, heappush\nfrom sys import stdin\n\n\ndef main():\n res = 0\n n = int(input())\n for i in range(n):\n if (i+1) % 3 != 0 and (i+1) % 5 != 0:\n res += (i+1)\n print(res)\n\n\ndef input(): return stdin.readline().rstrip()\n\n\nmain()\n']
['Wrong Answer', 'Accepted']
['s297974992', 's079451060']
[9100.0, 9396.0]
[2205.0, 159.0]
[196, 325]
p02712
u723636155
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 = N*(N+1)/2\n\nFizz_count = N//3\nBuzz_count = N//5\nFizzBuzz_count = N//15\n## r>1\ndef GeometricProgression(a_1,r,n):\n return int(a_1*(r^n -1)/r-1)\n\nSUM_Fizz = GeometricProgression(3,3,Fizz_count)\nSUM_Buzz = GeometricProgression(5,5,Buzz_count)\nSUM_FizzBuzz = GeometricProgression(15,15,FizzBuzz_count)\n\nresult = int(SUM - SUM_Fizz - SUM_Buzz + SUM_FizzBuzz)\nprint(result)', 'N = int(input())\n\nSUM = N*(N+1)/2\n# print(str(SUM))\n\nFizz_count = N//3\nBuzz_count = N//5\nFizzBuzz_count = N//15\n\n## r>1\ndef GeometricProgression(a_1,r,n):\n return int(a_1*(r^n -1)/r-1)\n\ndef Touhi(a_1,d,n):\n return int(n*(2*a_1+(n-1)*d)/2)\n\n\n\nSUM_Fizz = Touhi(3,3,Fizz_count)\nSUM_Buzz = Touhi(5,5,Buzz_count)\nSUM_FizzBuzz = Touhi(15,15,FizzBuzz_count)\n\n\n\nresult = int(SUM - SUM_Fizz - SUM_Buzz + SUM_FizzBuzz)\nprint(result)']
['Wrong Answer', 'Accepted']
['s792869886', 's107361665']
[9196.0, 9212.0]
[22.0, 20.0]
[393, 523]
p02712
u723711163
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\nres = 0\nfor i in range(3, N+1):\n if i % 15 == 0 or i % 3 == 0 or i % 5 == 0:\n continue\n res += i\n\nprint(res)', 'N = int(input())\n\nres = 0\nfor i in range(1, N+1):\n if i % 15 == 0 or i % 3 == 0 or i % 5 == 0:\n continue\n res += i\n\nprint(res)\n']
['Wrong Answer', 'Accepted']
['s377429124', 's289929836']
[9164.0, 9092.0]
[198.0, 201.0]
[131, 132]
p02712
u727051308
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\n\nfor i in range (1 , N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n S += i', 'N = int (input ())\nS = 0\n\nfor i in range (1 , N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n S += i\n\nprint(S)']
['Wrong Answer', 'Accepted']
['s638462372', 's061420244']
[9164.0, 9156.0]
[149.0, 148.0]
[104, 114]
p02712
u729008627
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())\nL = [0 if x//3==0 or x//5==0 else x for x in range(1,16)]\nQ = N//15\nR = N%15\nS = 30 * Q * (Q+1) + sum(L[R-1])\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)\n']
['Runtime Error', 'Accepted']
['s666410255', 's725523090']
[9092.0, 9020.0]
[23.0, 145.0]
[135, 92]
p02712
u729133443
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.
['*x,=range(int(input())+1);x[::3]=x[::5]=0;print(sum(x))', 'from numpy import*;print(sum(arange(int(input())+1)[i%3>0<i%5]))', 'print(sum(i for i in range(int(input())+1)if i%3>0<i%5))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s287398889', 's670220869', 's114421452']
[48244.0, 34468.0, 9164.0]
[59.0, 105.0, 112.0]
[55, 64, 56]
p02712
u730710086
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.
['# -*- coding: <encoding name> -*-\n\nn = int(input())\ntotal = 0\nfor i in range(1, n + 1):\n\tif (i % 3) != 0 and (i % 5) != 0:\n\t\ttotal = total + 1\nprint(total)\n', '# -*- coding: <encoding name> -*-\n\nn = int(input())\ntotal = 0\nfor i in range(1, n + 1):\n\tif i % 3 != 0 and i % 5 != 0:\n\t\ttotal +=\nprint(total)\n', '# -*- coding: <encoding name> -*-\n\nn = int(input())\ntotal = 0\nfor i in range(1, n + 1):\n\tif (i % 3) != 0 and (i % 5) != 0:\n\t\ttotal +=\nprint(total)\n', '# -*- coding: <encoding name> -*-\n\nn = int(input())\ntotal = 0\nfor i in range(1, n + 1):\n\tif (i % 3) != 0 and (i % 5) != 0:\n\t\ttotal += i\nprint(total)\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s468848457', 's596628487', 's887131490', 's482158673']
[9116.0, 8952.0, 9040.0, 9168.0]
[147.0, 24.0, 21.0, 154.0]
[156, 143, 147, 149]
p02712
u732743460
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.
['f=t//5\ntt=t//3\nff=t//15\nf=(f*(f+1)//2 )*5\ntt=(tt*(tt+1)//2 )*3\nff =(ff*(ff+1)//2 )*15\nprint(t*(t+1)//2 - f -tt +ff)\n', 't = int(input())\nf=t//5\ntt=t//3\nff=t//15\nf=(f*(f+1)//2 )*5\ntt=(tt*(tt+1)//2 )*3\nff =(ff*(ff+1)//2 )*15\nprint(t*(t+1)//2 - f -tt +ff)']
['Runtime Error', 'Accepted']
['s231621087', 's858069591']
[8988.0, 9188.0]
[21.0, 23.0]
[116, 132]
p02712
u733581231
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.
['mxn = 10**6 + 11\narr = []\nfor i in range(1,mxn):\n if i % 3 == 0 and i % 5 == 0:\n arr.append(0)\n elif i % 3 == 0:\n arr.append(0)\n elif i%5 == 0:\n arr.append(0)\n else:\n arr.append(i)\n\nn = int(input())\nprint(sum[:n])\n', 'mxn = 10**6 + 11\narr = []\nfor i in range(1,mxn):\n if i % 3 == 0 and i % 5 == 0:\n arr.append(0)\n elif i % 3 == 0:\n arr.append(0)\n elif i%5 == 0:\n arr.append(0)\n else:\n arr.append(i)\n\nn = int(input())\nprint(sum(arr[:n]))\n']
['Runtime Error', 'Accepted']
['s636008318', 's203532284']
[33696.0, 41628.0]
[252.0, 271.0]
[254, 259]
p02712
u735335967
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\nn = int(input())\nans = 0\nfor i in range(1,n+1):\n for j in range(1,n+1):\n c = math.gcd(i,j)\n for k in range(1,n+1):\n ans += math.gcd(c,k)\nprint(ans)\n', 'n = int(input())\nans = 0\nfor i in range(1,n+1):\n if i % 15 == 0:\n continue\n elif i % 5 == 0:\n continue\n elif i % 3 == 0:\n continue\n else:\n ans += i\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s761646490', 's328313827']
[9004.0, 9160.0]
[2205.0, 196.0]
[189, 199]
p02712
u736564905
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.
['num=int(input())\nsum=0\nfor i in range(1, num+1):\n if num%3!=0 and num%5!=0:\n sum=sum+i\nprint(sum)', 'num=int(input())\nsum=0\nfor i in range(1,num+1):\n if i%3!=0 and i%5!=0:\n sum=sum+i\nprint(sum)']
['Wrong Answer', 'Accepted']
['s463209661', 's005194662']
[9164.0, 9108.0]
[199.0, 157.0]
[101, 96]
p02712
u736757761
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())\nF=N//3\nB=N//5\nfb=N//15\nS=(N*(N+1))//2\nFizz=(3*F*(F+1))//2\nBuzz=(5*B*(B+1))//2\nFizzBuzz=(15*fb*(fb+1))//2\nprint(S-Fizz-Buzz+FizzBuzz)\n\n\n', 'N=int(input())\nF=N//3\nB=N//5\nfb=N//15\nS=(N*(N+1))//2\nFizz=(3*F*(F+1))//2\nBuzz=(5*B*(B+1))//2\nFizzBuzz=(15*fb*(fb+1))//2\nprint(S-Fizz-Buzz+FizzBuzz)\n\n\n']
['Runtime Error', 'Accepted']
['s893318049', 's950403760']
[8936.0, 9104.0]
[20.0, 27.0]
[152, 150]
p02712
u737718679
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('N=',N)\nsum=0\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)']
['Wrong Answer', 'Accepted']
['s820342278', 's088776522']
[9112.0, 9040.0]
[156.0, 156.0]
[114, 93]
p02712
u745687363
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\nA = 3*a*(a+1)/2\nB = 5*b*(b+1)/2\nC = 15*c*(c+1)/2\nprint(n*(n+1)/2 - A-B+C)', 'n = int(input())\na = n//3\nb = n//5\nc = n//15\nA = 3*a*(a+1)/2\nB = 5*b*(b+1)/2\nC = 15*c*(c+1)/2\nprint(int(n*(n+1)/2 - A-B+C))\n']
['Wrong Answer', 'Accepted']
['s414448369', 's717089228']
[9180.0, 9176.0]
[20.0, 21.0]
[118, 124]
p02712
u749742659
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\nsamu = 0\n\nfor i in range(n):\n if(n % 3 != 0 and n % 5 != 0):\n samu += i\n\nprint(str(int(samu)))\n', 'n = int(input())\n\nsamu = 0\n\nfor i in range(n):\n if(n % 3 != 0 or n % 5 != 0):\n samu += i\n\nprint(str(int(samu)))\n', 'n = int(input())\n\nsamu = 0\n\nfor i in range(n):\n j = i + 1\n if(j % 3 != 0 and j % 5 != 0):\n samu += j\n\nprint(str(int(samu)))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s265158331', 's828796455', 's943118565']
[9160.0, 9144.0, 9144.0]
[201.0, 160.0, 206.0]
[123, 122, 137]
p02712
u750651325
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_a = []\n\nfor i in range(1, N+1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n list_a.append(int(i))\n\nprint(list_a)\nprint(sum(list_a))\n', 'N = int(input())\nlist_a = []\n\nfor i in range(1, N+1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n list_a.append(int(i))\n\nprint(sum(list_a))\n']
['Wrong Answer', 'Accepted']
['s568062302', 's963097101']
[38196.0, 29980.0]
[270.0, 206.0]
[174, 160]
p02712
u752236842
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=int(input())\nn=0\nfor i in range(1,K+1):\n if(i%3==0 and i%5==0):\n pass\n else:\n n+=i\n\nprint(n)', 'K=int(input())\nn=0\nfor i in range(1,K+1):\n if(i%3==0):\n pass\n elif(i%5==0):\n pass\n elif(i%3==0 and i%5==0):\n pass\n else:\n n+=i\n\nprint()', 'K=int(input())\nn=0\nfor i in range(1,K+1):\n if(i%3==0):\n pass\n elif(i%5==0):\n pass\n elif(i%3==0 and i%5==0):\n pass\n else:\n n+=i\n\nprint(n)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s181612422', 's232019326', 's592484962']
[9092.0, 9060.0, 9104.0]
[164.0, 171.0, 178.0]
[114, 175, 176]
p02712
u756030237
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 \nset3 = set(range(0, a+1, 3))\nset5 = set(range(0, a+1, 5))\nseta = set(range(0, a+1))\n\nprint(set3, set5)\n\nprint(sum(seta-set3-set5))\n', 'a = int(input())\n \nset3 = set(range(0, a+1, 3))\nset5 = set(range(0, a+1, 5))\nseta = set(range(0, a+1))\n \nprint(sum(seta-set3-set5))']
['Wrong Answer', 'Accepted']
['s045596512', 's928287121']
[182912.0, 182896.0]
[291.0, 238.0]
[151, 132]
p02712
u762755436
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 print(i)\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 print(i)\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 ##print(i)\n if i%3!=0 and i%5!=0:\n ans += i\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s323946953', 's500960525', 's915635548']
[9828.0, 9748.0, 9168.0]
[428.0, 449.0, 154.0]
[122, 124, 126]
p02712
u763963344
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())\nf=0\nfor i in range(1,N+1):\n if i %15==0:\n print ("FizzBizz")\n if i%3==0:\n print("Fizz")\n if i%5==0:\n print("Buzz")\n else:\n print(i)\n f=f+i\nprint(f)', 'n = int(input())\nanswer = 0\n\nfor i in range(1, n + 1): \n if i % 3 != 0 and i % 5 != 0:\n answer += i \nprint(answer) \n']
['Wrong Answer', 'Accepted']
['s012322039', 's811065158']
[11808.0, 9148.0]
[593.0, 154.0]
[209, 270]
p02712
u765182585
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())\nk=[]\nfor i in range(1,a+1):\n k.append(i)\nfor i in k:\n if i%3==0 or i%5==0:\n k.remove(i)\n \ns=sum(k)\nprint(s)', 'a=int(input())\nl=[]\nfor i in range(1,a+1):\n l.append(i)\nk=[]\nfor i in range(1,a+1):\n if not i % 5 or not i % 3:\n k.append(i)\ns=sum(k)\nk=sum(l)\nprint(k-s)']
['Wrong Answer', 'Accepted']
['s451655398', 's768193309']
[48600.0, 67144.0]
[2207.0, 252.0]
[142, 166]
p02712
u766626319
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())\nl=[]\nsum=0\nfor i in range(1,n+1):\n if i%3==0 and i%5 ==0:\n l.apoend("FizzBuzz")\n elif i%3==0 and i%5!=0:\n l.append("Fizz")\n elif i%5==0 and i%3!=0:\n l.append("Buzz")\n else:\n l.append(i)\n sum+=i\nprint(sum)\n \n \n', 'n=int(input())\nl=[]\nsum=0\nfor i in range(1,n+1):\n if i%3==0 and i%5 ==0:\n l.apoend("FizzBuzz")\n elif i%3==0 and i%5!=0:\n l.append("Fizz")\n elif i%5==0 and i%3!=0:\n l.append("Buzz")\n elif i%3!=0 and i%5!=0:\n l.append(i)\n sum+=i\nprint(sum)\n \n ', 'n=int(input())\nl=[]\nsum=0\nfor i in range(1,n+1):\n if i%3!=0 and i%5!=0:\n l.append(i)\n sum+=i\nprint(sum)\n \n \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s280241458', 's285995137', 's140648001']
[9128.0, 9192.0, 29996.0]
[22.0, 23.0, 185.0]
[378, 395, 180]
p02712
u768752804
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(["FizzBuzz" if i%15==0 else "Fizz" if i%3==0 else "Buzz" if i%5==0 else i for i in range(1,int(input()))])\n', 'input_n = input()\nN = int(input_n)\nprint(["FizzBuzz" if i%15==0 else "Fizz" if i%3==0 else "Buzz" if i%5==0 else i for i in range(1,N+1)])\n', 'print(["FizzBuzz" if i%15==0 else "Fizz" if i%3==0 else "Buzz" if i%5==0 else i for i in range(1,101)])\n', 'N = int(input())\nsum = 0\nfor i in range(1,N+1):\n if i%15!=0 and i%3!=0 and i%5!=0:\n sum = sum + i\nprint(sum)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s239969519', 's480761494', 's620252455', 's797156287']
[51968.0, 51908.0, 9084.0, 9088.0]
[238.0, 233.0, 21.0, 186.0]
[113, 139, 104, 120]
p02712
u773305685
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,i+1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\nprint(ans)', 'n=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)']
['Runtime Error', 'Accepted']
['s504602324', 's557509611']
[9088.0, 9040.0]
[25.0, 156.0]
[107, 107]
p02712
u775681539
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 main():\n n = int(input())\n ans = 0\n for i in range(n):\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 ans += i\n print(ans)\nmain(', 'def main():\n n = int(input())\n ans = 0\n for i in range(1, 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 ans += i\n print(ans)\nmain()']
['Runtime Error', 'Accepted']
['s567651493', 's307643679']
[9032.0, 9168.0]
[19.0, 164.0]
[244, 250]
p02712
u777499281
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\tif (i+1) % 5 != 0 and (i+1) % 3 != 0:\n\t\tsum += i\nprint(sum)', 'N = int(input())\nsum = 0\nfor i in range(N):\n\tif (i+1) % 5 != 0 and (i+1) % 3 != 0:\n\t\tsum += i+1\nprint(sum)']
['Wrong Answer', 'Accepted']
['s495663893', 's252512543']
[9116.0, 8984.0]
[190.0, 202.0]
[104, 106]
p02712
u779293207
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())\nc=0\nfor i in range (1,N+1):\n if i%15==0:\n c += i//15\n elif i%3==0:\n c += i//3\n elif i%5==0:\n c += i//5\n else:\n c += i\n \nprint(c)\n \n \n ', 'N = int(input())\nc=0\nfor i in range (1,N+1):\n if i%15==0:\n c += 0\n elif i%3==0:\n c += 0\n elif i%5==0:\n c += 0\n else:\n c += i\n \nprint(c)\n \n \n \n']
['Wrong Answer', 'Accepted']
['s747989010', 's314212040']
[9168.0, 9168.0]
[233.0, 222.0]
[174, 165]
p02712
u780698286
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.
['num = int(input())\na = [i for i in range(1,num)]\nfor f in a:\n if f % 3 == 0:\n del a[a.index(f)]\n elif f % 5 == 0:\n del a[a.index(f)]\nprint(sum(a)) ', 'num = int(input())\na = [i for i in range(1, num + 1)]\nfor f in a:\n if f % 3 == 0:\n a.remove(f)\n elif f % 5 == 0:\n a.remove(f)\nprint(sum(a)) ', 'n = int(input())\na = 0\nfor i in range(1, n+1):\n if i % 3 != 0 and i % 5 != 0:\n a += i\nprint(a) ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s624388432', 's686061451', 's297966088']
[48428.0, 48400.0, 9108.0]
[2207.0, 2207.0, 160.0]
[158, 151, 102]
p02712
u782290921
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.
["x = int(input())\n\nif x % 3 == 0 and x % 5 == 0:\n print('FizzBuzz')\nelif x % 3 == 0 and x % 5 != 0:\n print('Fizz')\nelif x % 3 != 0 and x % 5 == 0:\n print('Buzz')\nelse:\n print(x)", "x = int(input())\n\nif x % 3 == 0 and x % 5 == 0:\n print('FizzBuzz')\nelif x % 3 == 0 and x % 5 != 0:\n print('Fizz')\nelif x % 3 != 0 and x % 5 == 0:\n print('Buzz')\nelse:\n print(str(x))\n", "x = int(input())\n\nif x % 3 == 0 and x % 5 == 0:\n print('FizzBuzz')\nelif x % 3 == 0 and x % 5 != 0:\n print('Fizz')\nelif x % 3 != 0 and x % 5 == 0:\n print('Buzz')\nelse:\n print(x)\n ", 'x = int(input())\n\ndigit = 0\nfor i in range(x):\n x = i + 1\n\n if x % 3 == 0 and x % 5 == 0:\n continue\n elif x % 3 == 0 and x % 5 != 0:\n continue\n elif x % 3 != 0 and x % 5 == 0:\n continue\n else:\n digit += x\n\n\n\nprint(digit)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s044401492', 's173472868', 's995707857', 's726832166']
[9176.0, 9176.0, 9148.0, 9040.0]
[22.0, 19.0, 24.0, 283.0]
[188, 194, 193, 263]
p02712
u783340206
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\nn = int(input())\nA = np.arrange(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\tcount = count + 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']
['Runtime Error', 'Accepted']
['s262060405', 's651995670']
[8972.0, 34520.0]
[20.0, 1263.0]
[181, 190]
p02712
u785066634
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())\nl=[]\nfor i in range(n+1):\n if i%3==0:\n pass\n elif i%5==0:\n pass\n elif i%15==0:\n pass\n else:\n l.append(i)\nprint('l',l)\n \nprint(sum(l))\n", 'n=int(input())\nl=[]\nfor i in range(n+1):\n if i%3==0:\n pass\n elif i%5==0:\n pass\n elif i%15==0:\n pass\n else:\n l.append(i)\n\n \nprint(sum(l))\n']
['Wrong Answer', 'Accepted']
['s450777738', 's917959219']
[37996.0, 30168.0]
[235.0, 176.0]
[196, 184]
p02712
u787731363
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=input()\nN=int(N)\na=int(N/3)\nb=int(N/5)\nc=int(N/15)\nS=N*(N+1)/2 - 3*a*(a+1)/2 - 5*b*(b+1)/2 + 15*c*(c+1)/2\nprint(S)', '#b\nimport sys\nN=input()\nN=int(N)\na=int(N/3)\nb=int(N/5)\nc=int(N/15)\nS=N*(N+1)/2 - 3*a*(a+1)/2 - 5*b*(b+1)/2 + 15*c*(c+1)/2\nprint(int(S))']
['Wrong Answer', 'Accepted']
['s229817864', 's531216434']
[9180.0, 9184.0]
[21.0, 23.0]
[127, 135]
p02712
u789436713
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())\nkazuof3 = N // 3\nkazuof5 = N // 5\nkazuof15 = N//15\n\nans = N * (N + 1) / 2 - kazuof3 * (kazuof3 + 1) * 3 / 2 - kazuof5 * (kazuof5 + 1) * 5 / 2 + kazuof15 * (kazuof15 + 1) * 15 / 2\nprint(ans)', 'N = int(input())\nkazuof3 = N // 3\nkazuof5 = N // 5\nkazuof15 = N//15\n\nans = N * (N + 1) // 2 - kazuof3 * (kazuof3 + 1) * 3 //2 - kazuof5 * (kazuof5 + 1) * 5 // 2 + kazuof15 * (kazuof15 + 1) * 15 // 2\nprint(ans)']
['Wrong Answer', 'Accepted']
['s060325776', 's397353398']
[9180.0, 9176.0]
[20.0, 22.0]
[206, 209]
p02712
u798260206
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 == 0:\n print(Fizz)\n elif i % 5 == 0:\n print(Buzz)\n elif i % 15 == 0:\n print(FizzBuzz)\n else:\n sum += i\n \nprint (sum)', 'N = int,input()\nsum = 0\n\n\nfor i in range(N):\n if i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n elif i % 15 == 0 :\n pass\n else:\n sum += i\n\nprint(sum)\n', 'N = map(int,input().split())\nsum = 0\n\n\nfor i in range(N):\n if i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n elif i % 15 == 0 :\n pass\n else:\n sum += i\n\nprint(sum)\n', 'n = input()\nN = int(n)\nsum = 0\n\nfor i in range(N+1):\n if N % 3 == 0:\n print(Fizz)\n elif N % 5 == 0:\n print(Buzz)\n elif N % 15 == 0:\n print(FizzBuzz)\n else:\n sum += N\n\nprint (sum)', 'N = int(input())\nsum = 0\n\n\nfor i in range(N+1):\n if i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n elif i % 15 == 0 :\n pass\n else:\n sum += i\n\nprint(sum)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s056327490', 's253049498', 's273738115', 's865024303', 's370474467']
[9156.0, 9104.0, 9104.0, 9184.0, 9164.0]
[22.0, 21.0, 23.0, 228.0, 183.0]
[211, 214, 227, 215, 217]
p02712
u799428010
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//500\nprint(A)\nB=N-A*500\nprint(A)', 'N=int(input())\nans=0\nfor i in range (N+1):\n if i%3!=0 and i%5!=0:\n ans=ans+i\nprint(ans)']
['Wrong Answer', 'Accepted']
['s005347543', 's175171065']
[9048.0, 9164.0]
[27.0, 166.0]
[51, 97]
p02712
u800058906
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\na=0\nb=0\nc=0\n\nfor i in range(1,n//3+1):\n a+=3*i\n\nfor i in range(1,n//5+1):\n b+=5*i\n \nfor i in range(1,n//15+1):\n c+=15*i\n \nprint(1/2*n*(n+1)-(a+b-c))\n', 'n=int(input())\n\na=0\nb=0\nc=0\n\nfor i in range(n//3):\n a+=3*i\n\nfor i in range(n//5):\n b+=5*i\n \nfor i in range(n//15):\n c+=15*i\n \nprint(1/2*n*(n+1)-(a+b-c))', 'n=int(input())\n\na=0\nb=0\nc=0\n\nfor i in range(1,n//3+1):\n a+=3*i\n\nfor i in range(1,n//5+1):\n b+=5*i\n \nfor i in range(1,n//15+1):\n c+=15*i\n\nprint(1//2*n*(n+1)-(a+b-c))', 'n=int(input())\n\na=0\nb=0\nc=0\n\nfor i in range(1,n//3+1):\n a+=3*i\n\nfor i in range(1,n//5+1):\n b+=5*i\n \nfor i in range(1,n//15+1):\n c+=15*i\n \nprint(int(1/2*n*(n+1)-(a+b-c)))\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s073647867', 's394502659', 's401876238', 's825281075']
[9112.0, 9192.0, 9128.0, 9112.0]
[93.0, 94.0, 99.0, 91.0]
[169, 155, 167, 174]
p02712
u800507623
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()\ntotal=0\nwhile i < a:\n if i %5 != 0 and i %3 != 0:\n total += a\n \n\tprint(total)', 'a = int(input())\ntotal=0\nwhile i < a:\n if i %5 != 0 and i %3 != 0:\n total += a\nprint(total)', 'a = int(input())\ntotal = 0\nfor i in range(1, a+1):\n if i % 5 != 0 and i % 3 != 0:\n total += a\nprint(total)', 'a = int(input())\ntotal = 0\nfor i in range(1, a+1):\n if i % 5 != 0 and i % 3 != 0:\n total += a\n\nprint(total)', 'a=input()\ntotal=0\nwhile i < a:\n if i %5 != 0 and i %3 != 0:\n total += a\n\nprint(total)', 'a=input()\ntotal=0\nfor i in range(1, a):\n if i %5 != 0 and i %3 != 0:\n total += a\nprint(total)', 'a = int(input())\nwhile i < a:\n if i %5 != 0 and i %3 != 0:\n total += a\nprint(total)', 'a = int(input())\ntotal = 0\nwhile i < a:\n if i %5 != 0 and i %3 != 0:\n total += a\n else:\n continue\nprint(total)', 'a = int(input())\ntotal = 0\nfor i in range(1, a+1):\n if i % 5 != 0 and i % 3 != 0:\n total += i\n\nprint(total)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s131835093', 's259075042', 's378184437', 's396248409', 's513313222', 's717288425', 's862701285', 's921099555', 's511441973']
[9028.0, 9108.0, 9156.0, 9172.0, 9096.0, 9096.0, 9164.0, 9168.0, 9164.0]
[22.0, 23.0, 164.0, 163.0, 19.0, 21.0, 18.0, 24.0, 153.0]
[91, 95, 110, 111, 89, 97, 87, 118, 111]
p02712
u802662134
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\nk = N // 3\nl = N // 5\nm = N // 15\n\nsum = (N * (N + 1) / 2) - (3 * (-1 + 3**k)/2) - (5 * (-1 + 5**l)/4) + (15 * (-1 + 15**k)/14)\nprint(sum)', 'N = int(input())\n \nk = N // 3\nl = N // 5\nm = N // 15\n \nsum = (N * (N + 1) / 2) - (3* k * (k + 1) / 2) - (5* l * (l + 1) / 2) + (15* m * (m + 1) / 2)\nprint(int(sum))']
['Runtime Error', 'Accepted']
['s040991526', 's473788564']
[9024.0, 9176.0]
[19.0, 21.0]
[151, 164]
p02712
u802796197
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())\nanswer = 0 \n\nfor i in range(1, n + 1):\n if i % 3 == 0 or i % 5 == 0:\n continue\n else:\n answer += i\n\n', 'n = int(input())\nanswer = 0\nfor i in range(1, n + 1):\n\n if n % 15 == 0:\n continue\n elif n % 3 == 0:\n continue\n elif n % 5 == 0:\n continue\n else:\n answer += i\n\nprint(answer)', 'n = int(input())\nanswer = 0 \n\nfor i in range(1, n + 1):\n if i % 3 == 0 or i % 5 == 0:\n continue\n else:\n answer += i\n\nprint(answer)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s206878751', 's778446780', 's382637055']
[9136.0, 9156.0, 9124.0]
[153.0, 229.0, 157.0]
[154, 212, 167]
p02712
u805852597
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 % 3 != 0) or (i % 5 != 0):\n ans += 0\nprint(ans)', 'n = int(input())\nans = 0\nfor i in range(n+1):\n if (i % 3 != 0) and (i % 5 != 0):\n ans += 0\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)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s522622853', 's790874346', 's873318323']
[8960.0, 9168.0, 9056.0]
[157.0, 150.0, 159.0]
[110, 111, 111]
p02712
u806779442
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+1):\n if i%3 != 0 and i%5 != 0:\n print(i)\n sum += i\n\nprint(sum)', 'n = int(input())\n\nsum = 0\nfor i in range(n+1):\n if i%3 != 0 and i%5 != 0:\n sum += i\n\nprint(sum)']
['Wrong Answer', 'Accepted']
['s379653773', 's642853514']
[9116.0, 9100.0]
[317.0, 154.0]
[122, 105]
p02712
u808569469
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 fizzbuzz_cul(number):\n if number % 15 == 0:\n return "FizzBuzz"\n if number % 3 == 0:\n return "Fizz"\n if number % 5 == 0:\n return "Buzz"\n return str(number)\n\n\ndef main():\n number = int(input())\n if 1 <= number <= 10 ** 6:\n result = fizzbuzz_cul(number)\n print(result)\n\n\nif __name__ == \'__main__\':\n main()\n', 'def fizzbuzz_cul(number):\n if number % 15 == 0:\n return "FizzBuzz"\n if number % 3 == 0:\n return "Fizz"\n if number % 5 == 0:\n return "Buzz"\n return str(number)\n\n\ndef main():\n for number in range(1, 31):\n result = fizzbuzz_cul(number)\n print(result)\n\n\nif __name__ == \'__main__\':\n main()\n', 'count = 0\nfor i in range(1, int(input()) + 1):\n if not(i % 5 == 0) and not(i % 3 == 0):\n count = count + i\n\nprint(count)\n\n\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s178811297', 's328497064', 's352986891']
[9172.0, 9036.0, 9028.0]
[29.0, 25.0, 161.0]
[363, 338, 133]
p02712
u823885866
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.readline())\nt = 0\nfor i in range(n):\n if i%3 != 0 or i%5 != 0:\n t += i\nprint(t)\n', 'import sys\nn = int(sys.stdin.readline())\nt = 0\nfor i in range(N):\n if i%3 != 0 or i%5 != 0:\n t += i\nprint(t)', 'import sys\nn = int(sys.stdin.readline())\nt = 0\nfor i in range(N):\n if i%3 != 0 or i%5 != 0:\n t += i\nprint(t)\n', 'import sys\nn = sys.stdin.readline()\nt = 0\nfor i in range(N):\n if i%3 != 0 or i%5 != 0:\n t += i\nprint(t)\n', 'import sys\nn = int(sys.stdin.readline())\nt = 0\nfor i in range(n+1):\n if i%3 != 0 and i%5 != 0:\n t += i\nprint(t)\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s086090072', 's202818707', 's432091828', 's733457443', 's808355342']
[9156.0, 9012.0, 9104.0, 9088.0, 9152.0]
[150.0, 20.0, 22.0, 25.0, 157.0]
[113, 114, 113, 108, 116]
p02712
u828139046
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\nlist = []\n\ncount = 1\n\nfor i in range(n):\n if count % 15 == 0:\n list.append(count)\n count += 1\n \nprint(sum(list))\n ', 'N = int(input())\n\ncount = 0\n\nfor i in range(N):\n\tnum = int(input())\n if num % 3 == 0 and num % 5 == 0:\n \tcontinue\n elif num % 3 == 0:\n \tcontinue\n elif num % 5 == 0:\n \tcontinue\n else:\n \tcount += num\n\nprint(count)', 'n = int(input())\n\nlist = []\n\ncount = 1\n\nfor i in range(n):\n if count % 3 != 0 and count % 5 != 0:\n list.append(count)\n count += 1\n \nprint(sum(list))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s176416584', 's555974845', 's840089599']
[11520.0, 8888.0, 29876.0]
[143.0, 20.0, 223.0]
[143, 235, 156]
p02712
u830881690
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 + 1):\n if i % 15 == 0:\n ai = FizzBuzz\n if i % 3 == 0 and i % 5 =! 0:\n ai = Fizz\n if i % 3 =! 0 and i % 5 == 0:\n ai = Buzz\n else:\n ai = i\n \n ans = ans + ai\n\nprint(ans)\n', 'N = int(input())\nans = 0\n\nfor i in range(N + 1):\n if i % 15 == 0:\n ai = 0\n if i % 3 == 0 and i % 5 =! 0:\n ai = 0\n if i % 3 =! 0 and i % 5 == 0:\n ai = 0\n else:\n ai = i\n \n ans = ans + ai\n\nprint(ans)\n', 'N = int(input())\nans = 0\n\nfor i in range(N + 1):\n if i % 3 == 0 or i % 5 == 0:\n ai = 0 \n else:\n ai = i\n \n ans = ans + ai\n\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s785248438', 's804809054', 's047470092']
[8872.0, 8892.0, 9036.0]
[25.0, 22.0, 196.0]
[228, 215, 143]
p02712
u831651889
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*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2)', 'N=int(input())\nprint(((N*(N+1))-(N//3*(N//3+1)*3)-(N//5*(N//5+1)*5)+(N//15*(N//15+1)*15))/2)', 'N=int(input())\nprint(str(((N*(N+1))-(N//3*(N//3+1)*3)-(N//5*(N//5+1)*5)+(N//15*(N//15+1)*15))/2))', 'print((N*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2))\n', 'N=int(input())\nprint((N*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2))\n\n', 'N=int(input())\nprint(((N*(N+1))-(N//3*(N//3+1)*3)-(N//5*(N//5+1)*5)+(N//15*(N//15+1)*15))/2)', 'N=int(input())\nprint(str((N*(N+1)/2)-(N//3*(N//3+1)/2)-(N//5*(N//5+1)/2)+(N//15*(N//15+1)/2)))', 'print((N*(N+1)/2)-((N//3)*((N//3)+1)/2)-((N//5)*((N//5)+1)/2)+((N//15)*((N//15)+1)/2))\n', 'N=int(input())\nprint(((N*(N+1))-(N//3*(N//3+1)*3)-(N//5*(N//5+1)*5)+(N//15*(N//15+1)*15))//2)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s176790225', 's211591920', 's508725154', 's556552026', 's668646986', 's674995076', 's712895076', 's930629130', 's765881166']
[9016.0, 9160.0, 9184.0, 9052.0, 9144.0, 9188.0, 9160.0, 9012.0, 9180.0]
[23.0, 21.0, 22.0, 20.0, 20.0, 22.0, 24.0, 23.0, 19.0]
[67, 92, 97, 75, 91, 92, 94, 87, 93]
p02712
u835068843
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.
["ef to_fizzbuzz(number):\n if number % 15 == 0:\n return 'FizzBuzz'\n\n if number % 3 == 0:\n return 'Fizz'\n\n if number % 5 == 0:\n return 'Buzz'\n\n else:\n return str(number)\n # return i\n\ndef main():\n N = int(input())\n \n fblist = []\n for number in range(1, 10**6):\n result = to_fizzbuzz(number)\n fblist.append(result)\n\n # print(fblist)\n\n \n n_list = fblist[0:N]\n \n\n n_numlist = []\n\n for s in n_list:\n if s.isdigit() == True:\n n_numlist.append(int(s))\n\n print(sum(n_numlist))\n\nmain()", 'def to_fizzbuzz(number):\n if number % 15 == 0:\n return \'FizzBuzz\'\n\n if number % 3 == 0:\n return \'Fizz\'\n\n if number % 5 == 0:\n return \'Buzz\'\n\n else:\n return str(number)\n # return i\n\ndef main():\n N = int(input())\n # this list concludes "FizzBuzz", "Fizz" or "Buzz"\n fblist = []\n for number in range(1, 10**6):\n result = to_fizzbuzz(number)\n fblist.append(result)\n\n # the list up to N\n n_list = fblist[0:N]\n # this list contains only numbers and up to N\n\n n_numlist = []\n\n for s in n_list:\n if s.isdigit() == True:\n n_numlist.append(int(s))\n\n print(sum(n_numlist))\n\n\nmain()']
['Runtime Error', 'Accepted']
['s287931615', 's328907691']
[9004.0, 79448.0]
[24.0, 463.0]
[687, 679]
p02712
u835924161
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.
['asn=int(0)\nfor i in range(int(input())):\n if i%3!=0 and i%5!=0:\n ans+=i\nprint(ans)', 'ans=int(0)\nfor i in range(int(input())+1):\n if i%3!=0 and i%5!=0:\n ans+=i\nprint(ans)']
['Runtime Error', 'Accepted']
['s902855230', 's496809903']
[9140.0, 9144.0]
[24.0, 157.0]
[92, 94]
p02712
u837340160
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(1, N+1):\n if i != 3 and i != 5:\n sum += i\n\nprint(sum)\n', 'N = int(input())\n\nsum = 0\nfor i in range(1, N+1):\n if (i % 3 != 0) and (i % 5 != 0):\n sum += i\n\nprint(sum)\n']
['Wrong Answer', 'Accepted']
['s609533728', 's218821067']
[9148.0, 9156.0]
[157.0, 156.0]
[105, 117]
p02712
u841599623
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())\nc = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i%5 != 0:\n c += i\nprint(i)', 'N = int(input())\nc = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i%5 != 0:\n c += i\nprint(c)']
['Wrong Answer', 'Accepted']
['s220474282', 's505594313']
[9160.0, 9160.0]
[159.0, 147.0]
[96, 96]
p02712
u842028864
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())\ntotal = 0\nfor i in range(1,N+1):\n\tif i%3!=0 and i%5!=0:\n \ttotal = total + 1\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n\tif i%3!=0 and i%5!=0:\n \ttotal += i\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1)\n if (i%3) != 0 and (i%5) ! =0:\n total += i\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n\tif N%3!=0 and N%5!=0:\n \ttotal += i\nprint(total) ', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n\tif i%3!=0 and i%5!=0:\n \ttotal +=i\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1)\n if i%3 != 0 and i%5 ! =0:\n total += i\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n\tif i%3 != 0 and i%5! = 0:\n\t\ttotal += i\nprint(total) ', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1)\n if i%3!=0 and i%5!=0:\n total += i\nprint(total)', 'N = int(input())\ntotal = 0\nfor i in range(1,N+1):\n\tif i%3!=0 and i%5!=0:\n \ttotal += i\nprint(total) ', 'N = int(input())\na = 0\nfor i in range(1, N+1):\n if (i % 3) != 0 and (i % 5) != 0:\n a += i\nprint(a)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s111837324', 's267743620', 's433689597', 's448969744', 's483511845', 's616052759', 's637796491', 's723052367', 's927522769', 's551625782']
[8996.0, 8864.0, 8892.0, 9008.0, 9028.0, 8996.0, 8964.0, 8944.0, 8944.0, 9132.0]
[22.0, 20.0, 22.0, 22.0, 24.0, 23.0, 24.0, 22.0, 22.0, 155.0]
[108, 101, 114, 105, 100, 110, 106, 106, 105, 102]
p02712
u844196583
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())\nj = 0\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 print(i)\n j = j + i\n\nprint(j)", "N = int(input())\nj = 0\nfor i in range(0,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 print(i)\n j = j + i\n\n print(j)", 'N = int(input())\nj = 0\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 # print(i)\n j = j + i\n\nprint(j)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s666724485', 's823740332', 's023817090']
[9308.0, 21472.0, 9020.0]
[458.0, 776.0, 201.0]
[249, 253, 269]
p02712
u845468321
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())\nl = 1\nli = []\nwhile l < n+1:\n if l % 3 == 0 and l % 5 == 0 or l % 3 == 0 or l % 5 == 0:\n li.append(l)\n l+=1\n else:\n li+-1\n\nprint(li)\n ', 'n = int(input())\nl = 1\nli = []\nwhile l < n+1:\n if l % 3 == 0 and l % 5 == 0 or l % 3 == 0 or l % 5 == 0:\n li.append(l)\n l+=1\n else:\n li+=1\n\nprint(li)\n ', 'n = int(input())\nl = 1\nli = []\nwhile l < n+1:\n if l % 3 == 0 and l % 5 == 0 or l % 3 == 0 or l % 5 == 0:\n l+=1\n else:\n li.append(l)\n l+=1\n\nprint(sum(li))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s292615773', 's691244145', 's088322241']
[9168.0, 9168.0, 30004.0]
[23.0, 24.0, 300.0]
[165, 165, 164]
p02712
u845573105
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 = (1+n)*n/2\n\nn3 = n//3\nn5 = n//5\nn15 = n//15\n\nsum3 = (1+n3)*n3/2 * 3\nsum5 = (1+n5)*n5/2 * 5\nsum15 = (1+n15)*n15/2 * 15\n\nsum = sum + sum15 -sum3 -sum5\n\nprint(sum)', 'n = int(input())\n \nsum = (1+n)*n/2\n \nn3 = n//3\nn5 = n//5\nn15 = n//15\n \nsum3 = (1+n3)*n3/2 * 3\nsum5 = (1+n5)*n5/2 * 5\nsum15 = (1+n15)*n15/2 * 15\n \nsum = sum + sum15 -sum3 -sum5\n \nprint(int(sum))']
['Wrong Answer', 'Accepted']
['s044863286', 's938101328']
[9120.0, 9184.0]
[23.0, 24.0]
[183, 193]
p02712
u845650912
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 numpy as np\nN = int(input())\nb = [i+1 for i in range(N)]\na = np.array(b)\n\nc =[]\n\nfor i in range(N):\n if a[i] % 3 == 0:\n c.append(a[i])\n if a[i] % 5 == 0:\n c.append(a[i])\n if a[i] % 15 == 0:\n c.append(-a[i])\n\nsum(c)', 'import numpy as np\nN = int(input())\nb = [i+1 for i in range(N)]\na = np.array(b)\n\nc = a - a//3 *3\nd = a - a//5 *5\n\ne = c*d\nsum(a*(e!=0))', 'import numpy as np\nN = int(input())\nb = [i+1 for i in range(N)]\na = np.array(b)\n\nc = a - a//3 *3\nd = a - a//5 *5\n\ne = c*d\nsum(a*(e!=0))\n', 'import numpy as np\nN = int(input())\nb = [i+1 for i in range(N)]\na = np.array(b)\n\nc = a - a//3 *3\nd = a - a//5 *5\n\ne = c*d\nprint(sum(a*(e!=0)))\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s398079057', 's543933849', 's565613198', 's018843440']
[97904.0, 106784.0, 106796.0, 106688.0]
[1854.0, 422.0, 410.0, 426.0]
[251, 135, 136, 143]
p02712
u846101221
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 = 0\nfor i in range(1, n + 1):\n if i % 3 == 0 and i % 5 == 0:\n s += i\n \nprint(s)', 'n = int(input())\n\ns = 0\nfor i in range(1, n + 1):\n if not i % 3 == 0 and not i % 5 == 0:\n s += i\n \nprint(s)']
['Wrong Answer', 'Accepted']
['s920521388', 's721988370']
[9160.0, 9152.0]
[101.0, 147.0]
[115, 123]
p02712
u846155148
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.
['sum = 0\nfor i in range(1, 10 ** 6 + 1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\nprint(sum)', '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']
['s899532355', 's401012423']
[9008.0, 9168.0]
[160.0, 158.0]
[101, 114]
p02712
u849647454
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())\nfizz = list()\nfor i in range(N):\n if i // 3 == 0 and i // 5 == 0:\n i = FizzBuzz\n elif i // 3 == 0: \n i = Fizz\n elif i // 5 == 0:\n i = Buzz\n else:\n fizz.append(i)\nprint(sum(fizz))', 'N = map(int,input().split())\nfizz = list()\nfor i in range(N):\n if i // 3 = 0 and i // 5 = 0:\n i = FizzBuzz\n elif i // 3 = 0 \n i = Fizz\n elif i // 5 = 0\n i = Buzz\n else:\n fizz.append(i)\nprint(sum(fizz))', 'N = int(input())\na = 0\nfor i in range(N+1):\n if not i % 3==0 or not i % 5 == 0:\n a += i\nprint(a)', 'N = input()\nfizz = list()\nfor i in range(int(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 fizz.append(i)\nprint(sum(fizz))', 'N = input()\nfizz = list()\nfor i in range(int(N+1)):\n if not i // 3==0 or not i//5==0:\n fizz.append(i)\nprint(sum(fizz))', 'N = input()\nfizz = list()\nfor i in range(int(N)):\n if not i // 3==0 and i//5==0\n fizz.append(i)\nprint(sum(fizz))', 'N = map(int,input().split())\nfizz = list()\nfor i in range(N):\n if i // 3 = 0 and i // 5 = 0:\n i = FizzBuzz\n elif i // 3 = 0 \n i = Fizz\n elif i // 5 = 0\n i = Buzz\n else:\n fizz.append(i)\nprint(sum(fizz))', 'N = input()\nfizz = list()\nfor i in range(int(N)):\n if not i // 3==0 and not i//5==0:\n fizz.append(i)\nprint(sum(fizz))', 'N = map(int,input().split())\nfizz = list()\nfor i in range(N):\n if i // 3 = 0 and i // 5 = 0:\n i = FizzBuzz\n elif i // 3 = 0 \n i = Fizz\n elif i // 5 = 0\n i = Buzz\n else:\n fizz.append(i)\nprint(sum(fizz))', 'N = int(input())\na = 0\nfor i in range(N+1):\n if i % 3 != 0 and i % 5 != 0:\n a += i\nprint(a)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s073061307', 's081114894', 's163064099', 's444588299', 's483416680', 's644871023', 's696222566', 's783216643', 's925098428', 's281937004']
[9056.0, 8868.0, 9132.0, 48520.0, 9088.0, 8980.0, 8996.0, 48640.0, 9024.0, 9076.0]
[22.0, 24.0, 170.0, 295.0, 24.0, 22.0, 21.0, 246.0, 22.0, 153.0]
[247, 241, 106, 231, 128, 122, 241, 127, 241, 101]
p02712
u851319680
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 ans += (i % 5 % 3)\n \nprint(ans)', 'N=int(input())\nans = 0\nfor i in range(1, N+1):\n if min(i % 5 , i % 3) == 0:\n continue\n else:\n ans += i\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s396263393', 's773485491']
[9164.0, 9164.0]
[144.0, 292.0]
[81, 136]
p02712
u852956428
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("a"))\nb=(sum(range(3,a+1,3)))\nc=(sum(range(5,a+1,5)))\nd=(sum(range(15,a+1,15)))\ne=a*(a+1)/2\nprint(int(e-b-c+d))', 'a=int(input())\nb=(sum(range(3,a+1,3)))\nc=(sum(range(5,a+1,5)))\nd=(sum(range(15,a+1,15)))\ne=a*(a+1)/2\nprint(int(e-b-c+d))']
['Wrong Answer', 'Accepted']
['s528620862', 's521515798']
[9184.0, 9180.0]
[29.0, 30.0]
[123, 120]
p02712
u855710796
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\n\n\nN = int(stdin.readline().rstrip().split()[0])\nSum = 0\n\nfor i in range(1, N+1):\n if i % 3 == 0 or i % 5 == 0 or i % 15 == 0:\n continue\n else:\n Sum += i\n print(i)\n\nprint(Sum)', 'from sys import stdin\n\n\n\nN = int(stdin.readline().rstrip().split()[0])\nSum = 0\n\nfor i in range(1, N+1):\n if i % 3 == 0 or i % 5 == 0 or i % 15 == 0:\n continue\n else:\n Sum += i\n\nprint(Sum)']
['Wrong Answer', 'Accepted']
['s733979245', 's809922206']
[9304.0, 9172.0]
[340.0, 186.0]
[248, 231]
p02712
u857330600
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)']
['Wrong Answer', 'Accepted']
['s805532542', 's886500433']
[9144.0, 9160.0]
[113.0, 155.0]
[83, 83]
p02712
u857428111
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.
['# coding: utf-8\n# Your code here!\n# coding: utf-8\nimport sys\nsys.setrecursionlimit(10000000)\n\n#const\ndxdy=((1,0),(0,1))\n# my functions here!\ndef pin(type=int):\n return map(type,input().rstrip().split())\n\ndef resolve():\n k,=pin()\n ans=0\n for i in range(1,k+1):\n if i%3!=0 and i%5!=0:\n ans+=i\n print(ans)\n \n \n\n\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n\n def test_入力例_1(self):\n input = """15"""\n output = """60"""\n self.assertIO(input, output)\n\n def test_入力例_2(self):\n input = """1000000"""\n output = """266666333332"""\n self.assertIO(input, output)\n\n\nif __name__ == "__main__":\n \u3000resolve()\n', '# coding: utf-8\n# Your code here!\n\n# coding: utf-8\n# Your code here!\n# coding: utf-8\nimport sys\nsys.setrecursionlimit(10000000)\n\n#const\ndxdy=((1,0),(0,1))\n# my functions here!\ndef pin(type=int):\n return map(type,input().rstrip().split())\n\ndef resolve():\n k,=pin()\n ans=0\n for i in range(1,k+1):\n if i%3!=0 and i%5!=0:\n ans+=i\n print(ans)\n \n \n\n\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n\n def test_入力例_1(self):\n input = """15"""\n output = """60"""\n self.assertIO(input, output)\n\n def test_入力例_2(self):\n input = """1000000"""\n output = """266666333332"""\n self.assertIO(input, output)\n\n\nif __name__ == "__main__":\n resolve()\n']
['Runtime Error', 'Accepted']
['s533715218', 's939105554']
[8980.0, 16344.0]
[21.0, 153.0]
[1219, 1252]
p02712
u860002137
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 numpy\na = np.array([i for i in range(1, int(input())+1)])\nprint(a[np.where((a % 3 != 0) & (a % 5 !=0))].sum())', 'import numpy as np\na = np.array([i for i in range(1, int(input())+1)])\nprint(a[np.where((a % 3 != 0) & (a % 5 !=0))].sum())']
['Runtime Error', 'Accepted']
['s372041373', 's822150411']
[26984.0, 74244.0]
[103.0, 248.0]
[117, 123]
p02712
u861471387
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\na = N//15\nb = N%15\nc = 0\n\nfor i in range(b+1):\n if i%3!=0 and i%5!=0:\n c=c+i+15*a\n\nans=(120*(a*(a-1)/2))+60*(a)+c\n\nprint(ans)', 'N = int(input())\n\na = N//15\nb = N%15\nc = 0\n\nfor i in range(b+1):\n if i%3!=0 and i%5!=0:\n c=c+i+15*a\n\nans=(120*(a*(a-1)/2))+60*(a)+c\n\nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s408511075', 's773459109']
[9188.0, 9188.0]
[22.0, 19.0]
[147, 152]
p02712
u864085306
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.
['num = int(input())\nans = 0\nfor i in range(num):\n i = i + 1\n if(i%3!=0 and i%5!=0):\n ans += i \n print(i)\nprint(ans)\n ', 'num = int(input())\nans = 0\nfor i in range(num):\n i = i + 1\n if(i%3!=0 and i%5!=0):\n ans += i \nprint(ans)\n ']
['Wrong Answer', 'Accepted']
['s206162292', 's064163416']
[9272.0, 8916.0]
[351.0, 206.0]
[127, 114]
p02712
u866374539
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())\nc=0\nfor i in (0,n):\n if i%3==0 and i%5==0:\n c+=i\nprint(c)\n', 'n=int(input())\nc=0\nfor i in range(0,n+1):\n if i%3!=0 and i%5!=0:\n# print(i)\n c+=i\nprint(c)\n']
['Wrong Answer', 'Accepted']
['s071460035', 's668549890']
[9156.0, 9092.0]
[24.0, 152.0]
[77, 98]
p02712
u869265610
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 total=0\n for i in range (1,N+1):\nif i%3!=0 and i%5=0\n total+i\n print(total)', 'N=int(input())\n total=0\n for i in range (1,N+1):\nif i%3!=0 and i%5=0\n total+=i\n print(total)', 'N = int(input())\ntotal = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i % 5 != 0:\n total += i\nprint(total)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s212094580', 's852111177', 's144873096']
[8948.0, 8904.0, 9164.0]
[20.0, 23.0, 149.0]
[95, 96, 116]
p02712
u875449556
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\n\ncount = 0\nfor i in range(N):\n if N % 15 == 0:\n continue\n elif N % 3:\n continue\n elif N % 5:\n continue\n else:\n count += i\nprint(count)', 'N = int(input())\n\n\nc = 0\nfor i in range(1,N+1):\n if i % 15 == 0:\n continue\n elif i % 5 == 0:\n continue\n elif i % 3 == 0:\n continue\n else:\n c += i\n\nprint(c)']
['Runtime Error', 'Accepted']
['s623470827', 's915853945']
[9036.0, 9164.0]
[20.0, 185.0]
[187, 195]
p02712
u875541136
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.
['count = 0\nfor i in range(1, 61):\n if i%3 and i%5:\n count += i\nprint(count)', 'count = 0\nn = int(input())\nfor i in range(1, n+1):\n if i%3 and i%5:\n count += i\nprint(count)']
['Wrong Answer', 'Accepted']
['s099236893', 's528003898']
[8956.0, 9160.0]
[22.0, 146.0]
[78, 96]
p02712
u877428733
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())\nl = [i for i in range(N+1) if i % 3 == 0 or i % 5 == 0]\nprint(l)\nprint(sum(l))', 'N = int(input())\n\nl = []\nfor i in range(N+1):\n if not i % 3 == 0 and not i % 5 == 0:\n l.append(i)\nprint(l)', 'N = int(input())\nl = [i for i in range(N+1) if not i % 3 == 0 and not i % 5 == 0]\nprint(sum(l))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s057366463', 's922390810', 's829462423']
[34464.0, 38308.0, 30020.0]
[146.0, 219.0, 112.0]
[96, 116, 96]
p02712
u878138257
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\na = n//15\nb = n//3\nc = n//5\n\nd = n*(1+n)/2-b*(1+b)/2*3-c*(1+c)/2*5+a*(1+a)*15\nprint(d)', 'n = int(input())\n\na = n//15\nb = n//3\nc = n//5\nd,e,f,g = 0,0,0,0\n\nfor i in range(n+1):\n d = d+i\nfor j in range(a+1):\n e = e+j\nfor k in range(b+1):\n f = f+k\nfor l in range(c+1):\n g = g+l\n\nh = d-(f*3)-(g*5)+(e*15)\nprint(int(h))']
['Wrong Answer', 'Accepted']
['s667821460', 's265818876']
[9160.0, 9208.0]
[22.0, 167.0]
[104, 236]
p02712
u878291720
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+1):\n if i%3!=0 and i%5!=0:\n cnt += i\nprint(i)', 'N = int(input())\n\ncnt = 0\nfor i in range(1, N+1):\n if i%3!=0 or i%5!=0:\n cnt += i\nprint(i)', 'N = int(input())\n\ntotal = sum([i for i in range(1,N+1) if i%3!=0 and i%5!=0]\nprint(total)', 'N = int(input())\n \ntotal = sum([i for i in range(1,N+1) if i%3!=0 and i%5!=0])\nprint(total)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s741350954', 's874083801', 's892805952', 's415590226']
[9160.0, 9160.0, 9032.0, 29984.0]
[154.0, 162.0, 20.0, 109.0]
[96, 94, 89, 91]
p02712
u879921371
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.
[' i=int(input())\n i1=i*(i+1)/2\n i2=i//3\n i3=i//5\n i4=i2*(i2+1)/2\n i5=i3*(i3+1)/2\n i6=i//15\n i7=i6*(i6+1)/2\n print(i1-i4-i5+i6)', 'i=int(input())\ni1=i*(i+1)/2\ni2=i//3\ni3=i//5\ni4=i2*(i2+1)/2\ni5=i3*(i3+1)/2\ni6=i//15\ni7=i6*(i6+1)/2\nprint(i1+i4+i5-i6)', 'i=int(input())\ni1=i*(i+1)/2\ni2=i//3\ni3=i//5\ni4=i2*(i2+1)/2\ni5=i3*(i3+1)/2\ni6=i//15\ni7=i6*(i6+1)/2\nprint(i1-i4-i5+i7)', 'i=int(input())\ni1=i*(i+1)//2\ni2=i//3\ni3=i//5\ni4=i2*(i2+1)//2\ni5=i3*(i3+1)//2\ni6=i//15\ni7=i6*(i6+1)//2\nprint(i1-i4*3-i5*5+i7*15)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s311368104', 's528002044', 's700095059', 's759668784']
[9004.0, 9180.0, 9184.0, 9184.0]
[22.0, 20.0, 21.0, 21.0]
[152, 116, 116, 127]
p02712
u881816188
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\nfrom functools import reduce\n\n\ndef gcd(*numbers):\n return reduce(math.gcd, numbers)\n\nk=int(input())\nans=0\nfor i in range(1,k+1):\n for j in range(1,k+1):\n for l in range(1,k+1):\n ans+=gcd(i,j,k)\n #print(gcd(i,j,l))\nprint(ans)', 'n=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']
['s845355674', 's310626868']
[9640.0, 9160.0]
[2205.0, 157.0]
[271, 95]
p02712
u888380104
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\n\nfor i in range(n,n+1):\n if i % 3 ==0 and i % 5 == 0:\n i = 0\n else:\n a = a + i', "N = int(input())\nb = 0\n\nfor i in range (1,int(N)+1):\n if i % 15 == 0 :\n a = 'FizzBuzz'\n elif i % 3 == 0:\n a = 'Fizz'\n elif i % 5 == 0:\n a = 'Buzz'\n else:\n b = b + i\n", 'b = 0\nN = int(input())\nfor i in range(N,N+1):\n if i % 3 == 0 and i % 5 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n b = b + 1\n \nprint(b)\n', 'total = []\nN = int(input())\nfor i in range(N,N+1):\n if i % 3 == 0 and i % 5 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n total.append(i)\n\nprint(sum(total))\n', 'n = int(input())\na = 0\n\nfor i in range(n,n+1):\n if i % 3 ==0 or i % 5 == 0:\n i = 0\n else:\n a = a + i\n\nprint(a)', "N = int(input())\n\nfor i in range (1,int(N)+1):\n if i % 15 == 0 :\n a = 'FizzBuzz'\n elif i % 3 == 0:\n a = 'Fizz'\n elif i % 5 == 0:\n a = 'Buzz'\n else:\n b = b + i\n", "N = int(input())\nb = 0\n\nfor i in range (1,N+1):\n if i % 3 == 0 and i % 5 == 0:\n a = 'FizzBuzz'\n elif i % 3 == 0:\n a = 'Fizz'\n elif i % 5 == 0:\n a = 'Buzz'\n else:\n b = b+ i\n\n", "N = int(input())\na = 0\n\nfor i in range (1,N+1):\n if i % 15 == 0 :\n a = 'FizzBuzz'\n elif i % 3 == 0:\n a = 'Fizz'\n elif i % 5 == 0:\n a = 'Buzz'\n else:\n a + i\n", 'n = int(input())\na = 0\n\nfor i in range(n,n+1):\n if i % 3 ==0 and i % 5 == 0:\n i = 0\n else:\n a = a + i\n\nprint(a)', "N = int(input())\na = 0\n\nfor i in range (1,N+1):\n if i % 3 == 0 and i % 5 == 0:\n a = 'FizzBuzz'\n elif i % 3 == 0:\n a = 'Fizz'\n elif i % 5 == 0:\n a = 'Buzz'\n else:\n a = a + i\n\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))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s046434132', 's083395297', 's225695723', 's277979637', 's729440742', 's763830898', 's782557033', 's806859036', 's863678448', 's904952308', 's805447304']
[9064.0, 9152.0, 9160.0, 9160.0, 9140.0, 9152.0, 9144.0, 9128.0, 9152.0, 9168.0, 29848.0]
[27.0, 197.0, 29.0, 29.0, 26.0, 25.0, 210.0, 27.0, 27.0, 30.0, 221.0]
[121, 205, 169, 185, 130, 199, 215, 197, 131, 215, 223]
p02712
u888734843
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 i in range(1,n+1,1):\n if(i%3 == 0 or i%5 == 0):\n continue\n sum += i\n \nprint(sum)\n\n', 'n = int(input())\nsum = 0\n\nfor i in range(1,n+1,1):\n if(i%3 == 0 or i%5 == 0):\n continue\n sum += i\n \nprint(sum)\n\n']
['Runtime Error', 'Accepted']
['s053710443', 's692557847']
[8992.0, 9136.0]
[22.0, 152.0]
[113, 118]
p02712
u891422384
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())\ni,sum = 1,0\nwhile i<n+1:\n if i%3!=0 and i%5!=0: sum+=i\n i+=1\n print(sum)', 'n = int(input())+1\ni,sum = 1,0\nwhile i<n:\n if i%3!=0 and i%5!=0: sum+=i\n i+=1\nprint(sum)']
['Wrong Answer', 'Accepted']
['s269199457', 's140966736']
[14864.0, 9168.0]
[549.0, 198.0]
[92, 90]
p02712
u895788460
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=N//15\nP=[1,2,4,7,8,11,13,14]\nQ=0\n\nif S==0:\n if N < 2:\n D=1\n if N < 3:\n D=2\n if N < 7:\n D=7\n if N < 8:\n D=14\n if N < 11:\n D=22\n if N < 12:\n D=33\n if N < 14:\n D=46\n if N < 15:\n D=60\n print(D)\nelse:\n T=S-1\n D=(60+60+15*T*8)*S//2\n N1=N-15*S\n if N1 <2:\n D=D+1\n if N1 < 3:\n D=D+P[0]+P[2]\n if N1 < 7:\n D=D+7\n if N1 < 8:\n D=D+14\n if N1 < 11:\n D=D+22\n if N1 < 12:\n D=D+33\n if N1 < 14:\n D=D+46\n if N1 < 15:\n D=D+60\n print(D)', 'N=int(input())\nS=N//15\nP=[1,2,4,7,8,11,13,14]\nP2=[3,5,6,9,10,12]\nQ=0\nD=0\nif S==0:\n for i in range(1,N+1):\n if i in P2:\n continue\n else:\n D=D+i\nelse:\n T=S-1\n D=(60+60+15*T*8)*S//2\n N1=N-15*S\n for i in range(1,N1+1):\n if i in P2:\n continue\n else:\n D=D+i+15*S\n\nprint(D)\n \n']
['Wrong Answer', 'Accepted']
['s600763772', 's263061949']
[9264.0, 9208.0]
[22.0, 20.0]
[606, 359]
p02712
u898109279
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().split())\n\nprint(sum([n + 1 for n in range(N) if (n + 1) % 3 != 0 and (n + 1) % 5 != 0]))\n', 'N = list(map(int, input().split()))\n\nprint(sum([n for n in N if n % 3 != 0 and n % 5 != 0]))\n', 'N = int(input())\n\nprint(sum([n + 1 for n in range(N) if (n + 1) % 3 != 0 and (n + 1) % 5 != 0]))\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s624885598', 's898428248', 's731086900']
[8844.0, 9048.0, 30056.0]
[24.0, 29.0, 168.0]
[105, 93, 97]
p02712
u902430070
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 n%3 != 0 and n%5 != 0:\n \tans += i\nprint(ans)', 'n = int(input())\na = list(range(1,n+1))\nans = sum(a) - sum(list(range(0, n+1, 3))) - sum(list(range(0, n+1, 5))) + sum(list(range(0, n+1, 15)))\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s250541839', 's378223037']
[9164.0, 61476.0]
[201.0, 95.0]
[99, 155]
p02712
u910426639
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 or i % 5 != 0:\n ans += i\n\nprint(ans)\n', 'N = int(input())\n\nl = [int(x) for x in list(str(N))]\n\nif 7 in l:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nans = 0\nfor i in range(N + 1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n ans += i\n\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s433569621', 's481633118', 's138862189']
[9144.0, 9168.0, 9164.0]
[182.0, 21.0, 159.0]
[106, 103, 133]
p02712
u911612669
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 if i % 15 == 0:\n pass\n elif 1 % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n sum += i\n \nprint(sum)', 'n = int(input())\nsum = 0\n\nfor i in range(n+1):\n if i % 15 == 0:\n pass\n elif i % 3 == 0:\n pass\n elif i % 5 == 0:\n pass\n else:\n sum += i\n \nprint(sum)']
['Wrong Answer', 'Accepted']
['s708743988', 's919830143']
[9176.0, 9176.0]
[187.0, 189.0]
[162, 164]
p02712
u914802579
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\nfor i in range(1,int(input())+1):\n a+=(not (i%3 or i%5))*i\nprint(a)', 'a=0\nfor i in range(1,int(input())+1):\n a+=(not (i%3==0 or i%5==0))*i\nprint(a)']
['Wrong Answer', 'Accepted']
['s847534079', 's516828418']
[8968.0, 9156.0]
[174.0, 189.0]
[72, 78]
p02712
u915879510
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!=0 or i%5!=0:\n sum+=i\n \nprint(sum)', 'n = int(input())\nsum = 0\n\ni=1\nwhile(i<n+1):\n if i%3==0 or i%5==0:\n pass\n else:\n sum+=i\n i+=1\n \nprint(sum)']
['Wrong Answer', 'Accepted']
['s474794466', 's744822980']
[9160.0, 9160.0]
[158.0, 213.0]
[96, 117]
p02712
u916662650
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.
['x = int(input())\nsum = 0\n\nfor num in range(1,x+1):\n print(num)\n sum = sum + num\n if num%3 == 0 or num%5 == 0:\n sum = sum - num \n \n \n \n\nprint(sum)', 'x = int(input())\nsum = 0\n\nfor num in range(1,x+1):\n sum = sum + num\n if num%3 == 0 or num%5 == 0:\n sum = sum - num \n \n \n \n\nprint(sum)']
['Wrong Answer', 'Accepted']
['s978155698', 's144175399']
[9752.0, 9104.0]
[525.0, 208.0]
[175, 160]
p02712
u917444023
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=100000\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())\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())\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', 'Wrong Answer', 'Accepted']
['s068781039', 's900518192', 's377459274']
[9028.0, 9168.0, 9168.0]
[36.0, 158.0, 155.0]
[87, 89, 93]
p02712
u918601425
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%3!=0 and a%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)\n']
['Runtime Error', 'Accepted']
['s385460099', 's381095188']
[9040.0, 9064.0]
[23.0, 161.0]
[87, 88]
p02712
u919404987
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.
['sum([n for n in range(1, int(inpt())) if (n%3!=0) and (n%5!=0)])', 'N = input()\nprint(sum([n for n in range(1, N) if (n%3!=0) and (n%5!=0)]))', 'print(sum([n for n in range(1, int(inpt())) if (n%3!=0) and (n%5!=0)]))', 'N = input()\nprint(sum([n for n in range(1, N) if (n%3!=0) and (n%5!=0)]))', 'n = int(input())\n\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', 'Runtime Error', 'Runtime Error', 'Accepted']
['s003294144', 's559987920', 's652344443', 's790783431', 's750409938']
[9048.0, 8964.0, 9044.0, 9096.0, 8964.0]
[25.0, 21.0, 22.0, 21.0, 149.0]
[64, 73, 71, 73, 108]
p02712
u921729430
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())\nres = 0\nfor i in range(N+1):\n if i % 3 != 0 && i % 5 != 0:\n res += i\nprint(res)', 'N = int(input())\nres = 0\nfor i in range(N+1):\n if i % 3 != 0 and i % 5 != 0:\n res += i\nprint(res)']
['Runtime Error', 'Accepted']
['s202095511', 's293560986']
[8864.0, 9172.0]
[23.0, 154.0]
[100, 101]
p02712
u923269289
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):\n if(i%3!=0 or i%5!=0):\n a=a+i\n if(i%3==0 and i%5==0):\n a=a-i\nprint(a)\n ', 'n=int(input())\na=0\nfor i in range(1,n+1):\n if(i%3!=0 and i%5!=0):\n a=a+i\n \nprint(a)\n']
['Wrong Answer', 'Accepted']
['s173380755', 's392360999']
[9164.0, 9164.0]
[206.0, 154.0]
[120, 91]
p02712
u926585789
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\nsum=0\n\nfor i in int(n):\n if (i%3!=0)&(i%5!=0):\n sum+=i\nprint(sum)', 'n=input()\n \nsum=0\n \nfor i in range(1,int(n)+1):\n if (i%3!=0)&(i%5!=0):\n sum+=i\n \nprint(sum)']
['Runtime Error', 'Accepted']
['s629505577', 's391008228']
[9040.0, 9164.0]
[22.0, 162.0]
[80, 98]
p02712
u927807968
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())\ntotal=0\nfor i in range(0,n+1):\n if (i%3==0 and i%5==0) or i%3==0 or i%5==0:\n total+=0\n else:\n print(i)\n total+=i\nprint(total)', 'n=int(input())\ntotal=0\nfor i in range(0,n+1):\n if (i%3==0 and i%5==0) or i%3==0 or i%5==0:\n total+=0\n else:\n total+=i\nprint(total)']
['Wrong Answer', 'Accepted']
['s538755355', 's409607305']
[9248.0, 9180.0]
[392.0, 231.0]
[167, 150]
p02712
u932828048
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()\nn.remove('Buzz')\nn.remove('Fizz')\nn.remove('FizzBuzz')\nprint(sum(n))", "n=input()\nn.remove('Buzz','Fizz','FizzBuzz')\nprint(sum(n))", "n=input(a)\nn.remove('Buzz','Fizz','FizzBuzz')\nprint(sum(n))\n", 'n=int(input())\na=1\nb=0\nwhile True:\n\tif a%3!=0 and a%5!=0:\n\t\tb+=a\n\tif a==n:\n\t\tbreak\n\ta+=1\nprint(b)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s443616520', 's500929951', 's881175485', 's671661792']
[9100.0, 8896.0, 8896.0, 9044.0]
[22.0, 22.0, 20.0, 216.0]
[78, 58, 60, 98]
p02712
u932868243
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 (1,n+1):\n if i%3!=0 and i%5!=0:\n ans+=i\nprint(ans)', 'n=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']
['s125062377', 's623730133']
[9200.0, 9100.0]
[24.0, 155.0]
[84, 89]