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 | u516494592 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\nlist = []\n\nfor i in range(N):\n\tif (i+1) % 3 == 0:\n\t\n\telif (i+1) % 5 == 0:\n\t\n\telse:\n\t\tlist.append(i+1)\n\nprint(sum(list))', 'N = int(input())\nlist = []\n \nfor i in range(N):\n if (i+1) % 3 == 0:\n pass\n elif (i+1) % 5 == 0:\n pass\n else:\n list.append(i+1)\n \nprint(sum(list))'] | ['Runtime Error', 'Accepted'] | ['s901364165', 's397426906'] | [9012.0, 29992.0] | [24.0, 221.0] | [136, 160] |
p02712 | u516579758 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n=int(input())\ncount=0\nfor i in range(n+1):\n if i%5!=0 and i%3!=0:\n count+=i\n print(i)\nprint(count)\n', 'n=int(input())\ncount=0\nfor i in range(n+1):\n if i%5!=0 and i%3!=0:\n count+=i\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s384339226', 's374498505'] | [9212.0, 9172.0] | [315.0, 160.0] | [117, 99] |
p02712 | u520048479 | 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()\nb = 0\ns = 0\nfor i in n:\n if i%3 == 0 or i%5 == 0:\n continue\n else:\n s += i\n \nprint(s)', 'n = int(input())\nb = 0\ns = 0\nfor i in range(1,n+1):\n if i%3 == 0 or i%5 == 0:\n continue\n else:\n s += i\n \nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s717891216', 's421042779'] | [9092.0, 9164.0] | [22.0, 157.0] | [124, 140] |
p02712 | u523385176 | 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 for i in range(n)]\nfor i in range(m): #0,1,\n if i%3!=0 and i%5!=0:\n a[i]=int(i+1)\n\nprint(sum(a))\n', 'n=int(input())\na=[0 for i in range(n+1)]\nfor i in range(n+1): \n if i%3!=0 and i%5!=0:\n a[i]=int(i)\n\nprint(sum(a))\n'] | ['Runtime Error', 'Accepted'] | ['s439428328', 's899314122'] | [16572.0, 33892.0] | [56.0, 224.0] | [127, 208] |
p02712 | u523957440 | 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())\nfor i in N:\n if (i+1) % 3 == 0 or (i+1) % 5 == 0:\n pass\n else:\n m = i + 2\n\nprint(int(m))', 'N = int(input())\ni = 1\nm = 0\nfor i in range(N+1):\n if not i % 3 == 0 or i % 5 == 0:\n m += i\n i += 1\n \nprint (m)', 'N = int(input())\ni = 1\nm = 0\nfor i in range(N+1):\n if not i % 3 == 0 or i % 5 == 0:\n m += i\n \nprint (m)', 'N = int(input())\nm = 0\nfor i in range(N+1):\n if not i % 3 == 0 or i % 5 == 0:\n m += i\n \nprint (m)', 'N = int(input())\ni = 1\nfor i in N+1:\n if not i % 3 == 0 or i % 5 == 0:\n m += i\n\nprint (m)', 'N = int(input())\nm = 0\nfor i in range(N+1):\n if not (i % 3 == 0 or i % 5 == 0):\n m += i\n \nprint (m)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s020796017', 's469385946', 's569486602', 's663681080', 's700052555', 's225364378'] | [9148.0, 9064.0, 9192.0, 9124.0, 9160.0, 9104.0] | [23.0, 185.0, 154.0, 142.0, 20.0, 145.0] | [113, 118, 107, 101, 93, 103] |
p02712 | u527379148 | 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 fizz_buzz_sum(N):\n not_fizz_buzz = [i for i in range(N) if (i%3 != 0) and (i%5 != 0)]\n return sum(not_fizz_buzz)', 'def fizz_buzz_sum(N):\n not_fizz_buzz = [i for i in range(1, N+1) if (i%3 != 0) and (i%5 != 0)]\n return sum(not_fizz_buzz)\n\nprint(fizz_buzz_sum(int(input())))'] | ['Wrong Answer', 'Accepted'] | ['s033014143', 's206023110'] | [9096.0, 29892.0] | [19.0, 105.0] | [118, 159] |
p02712 | u530169312 | 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_sum=[]\n\n\nfor i in range(1, n + 1 ):\n if i % 15 ==0:\n "FizzBuzz"\n if i % 3 == 0:\n "Fizz"\n if i % 5 == 0:\n "Buzz"\n else:\n total_sum.append(i)\n \nprint(sum(total_sum))', 'n = int(input())\n\ntotal = []\n\n\nfor i in range(1, n + 1):\n if i % 15 == 0:\n "FizzBuzz"\n elif i % 5 == 0:\n "Buzz"\n elif i % 3 == 0:\n "Fizz"\n else:\n total.append(i) \nprint(sum(total))'] | ['Wrong Answer', 'Accepted'] | ['s428387547', 's458566577'] | [40368.0, 29696.0] | [254.0, 221.0] | [291, 244] |
p02712 | u530650201 | 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())\narray=[]\nfor i in range(N+1):\n if i%3!=0 and i%5!=0:\n array.append(i)\n\nprint(array)\nvalue=sum(array)\nprint(value)', 'N=int(input())\narray=[]\nN+=1\n\nfor i in range(1,N):\n if i%3!=0 and i%5!=0:\n array.append(i)\n\nvalue=sum(array)\nprint(value)'] | ['Wrong Answer', 'Accepted'] | ['s164677225', 's619381502'] | [38188.0, 29996.0] | [199.0, 170.0] | [138, 131] |
p02712 | u531813438 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\nn3=N//3\nn5=N//5\nn15=N//15\nS3 = 0.5*n3*(2*3+(n3-1)*3)\nS5 = 0.5*n5*(2*5+(n5-1)*5)\nS15 = 0.5*n15*(2*15+(n15-1)*15)\nS=(N+1)*N/2\nprint(S-S3-S5+S15)', 'N = int(input())\nn3=N//3\nn5=N//5\nn15=N//15\nS3 = 0.5*n3*(2*3+(n3-1)*3)\nS5 = 0.5*n5*(2*5+(n5-1)*5)\nS15 = 0.5*n15*(2*15+(n15-1)*15)\nS=(N+1)*N/2\nprint(int(S-S3-S5+S15))'] | ['Wrong Answer', 'Accepted'] | ['s561790638', 's275758941'] | [9216.0, 9216.0] | [23.0, 21.0] | [159, 164] |
p02712 | u532107923 | 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. | ['fizz = []\nbuzz = []\nfizzbuzz = []\nother = []\nn = int(input())\nfor i in range(n):\n temp = i+1\n if (temp % 3 != 0) & (temp % 5 != 0):\n print(i+1)\n other.append(i+1)\n\nb = sum(other)\n\nprint(b)\n\n\n\n', 'fizz = []\nbuzz = []\nfizzbuzz = []\nother = []\nn = int(input())\nfor i in range(n):\n temp = i+1\n if (temp % 3 != 0) & (temp % 5 != 0):\n other.append(temp)\n\nb = sum(other)\n\nprint(b)\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s990786889', 's987098321'] | [30292.0, 29992.0] | [429.0, 261.0] | [212, 194] |
p02712 | u535258729 | 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())\nt=0\nfor i in range(1,x+1):\n print(i)\n if i%3!=0 and i%5!=0:\n t+=i\nprint(t)\n', 'x=int(input())\nt=0\nfor i in range(1,x+1):\n if i%3!=0 and i%5!=0:\n t+=i\nprint(t)'] | ['Wrong Answer', 'Accepted'] | ['s471340104', 's250367620'] | [9944.0, 9160.0] | [438.0, 155.0] | [95, 83] |
p02712 | u535803878 | 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())\ntmp = n // 15\ntmp2 = n % 15\nd = [(15*(tmp) + i) for i in [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14]]\nfor i in [0,3,5,6,9,10,12]:\n d[i] = 0\n(tmp **2 * 60) + sum(d[:(tmp2+1)])', 'n = int(input())\ntmp = n // 15\ntmp2 = n % 15\nd = [(15*(tmp) + i) for i in [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14]]\nfor i in [0,3,5,6,9,10,12]:\n d[i] = 0\nprint((tmp **2 * 60) + sum(d[:(tmp2+1)]))'] | ['Wrong Answer', 'Accepted'] | ['s671654815', 's655494866'] | [9204.0, 9208.0] | [23.0, 22.0] | [185, 192] |
p02712 | u537142137 | 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. | ['D = [1, 3, 3, 7, 7, 7, 14, 22, 22, 22, 33, 33, 46, 60, 60]\n\nN = int(input())\n\nN -= 1\ns = N//15\nt = (60*s)*(s+1)\n\nm = s*15\nt += D[N-m] + 15*(N-m+1)\n\nprint(t)\n', 'D = [0, 1, 3, 3, 7, 7, 7, 14, 22, 22, 22, 33, 33, 46, 60, 0]\nE = [0, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 0]\n\nN = int(input())\n\ns = N//15\nt = (60*s)*(s)\n\nm = s*15\n\nt += D[N-m] + 15*E[N-m]*s\n\nprint(t)\n'] | ['Wrong Answer', 'Accepted'] | ['s442380834', 's910446093'] | [9184.0, 9196.0] | [22.0, 21.0] | [157, 213] |
p02712 | u539018546 | 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()\nxx= 0\nfor i in range(1,N+1):\n if((i%3!=0)&(i%5!=0)):\n xx += i\nprint(xx)', 'N = int(input())\nxx= 0\nfor i in range(1,N+1):\n if((i%3!=0)&(i%5!=0)):\n xx += i\nprint(xx)'] | ['Runtime Error', 'Accepted'] | ['s848973352', 's290564035'] | [9104.0, 9164.0] | [22.0, 171.0] | [93, 98] |
p02712 | u547537397 | 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 palin(x):\n #print(x)\n if x == x[::-1]: return True\n return False\n \na = input()\nn = len(a)\nif palin(a) and palin(a[:int((n-1)/2)]) and palin(a[int((n+3)/2)-1:]):\n print("Yes")\nelse: print("No")', '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'] | ['s390159373', 's504000673'] | [9048.0, 8920.0] | [31.0, 157.0] | [208, 112] |
p02712 | u548093253 | 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 = 0\nn = input(input())\nfor i in range(1,n+1):\n if i % 3 != 0 and i % 5 != 0:\n x += i\nprint(x)\n', 'n = int(input())\nans = 0\nfor i in range(n+1):\n if i%15!=0 and i%3!=0 and i%5!=0:\n ans += i\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s220816704', 's531514317'] | [8988.0, 9112.0] | [24.0, 187.0] | [106, 111] |
p02712 | u548775658 | 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\nwhile a in range(N+1):\n if a%3 !=0 and a%5 !=0:\n sum=sum+a\n a = a + 1\n else:a=a+1\nprint(sum)\n', 'N=input()\na=1\nsum=0\nwhile a in range(N):\n if a%3 !=0 and a%5 !=0:\n sum=sum+a\n a = a + 1\nprint(sum)', 'N=int(input())\na=1\nsum=0\nwhile a in range(N):\n if a%3 !=0 and a%5 !=0:\n sum=sum+a\n a = a + 1\nprint(sum)\n', 'N=int(input())\na=1\nsum=0\nwhile a in range(N+1):\n if a%3 !=0 and a%5 !=0:\n sum=sum+a\n a = a + 1\n else:a=a+1\nprint(sum)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s393385329', 's548880958', 's764028757', 's165379997'] | [9104.0, 8744.0, 8996.0, 9024.0] | [20.0, 30.0, 2205.0, 468.0] | [123, 105, 111, 126] |
p02712 | u550257207 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\nsum =0\nfor i in range(1,n+1):\n if i%3 !=0 and i%5 !=0:\n sum += i\n print(sum)', 'n = int(input())\nsum =0\nfor i in range(1,n+1):\n if i%3 !=0 and i%5 !=0:\n sum += i\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s482352391', 's490557369'] | [9332.0, 9164.0] | [314.0, 155.0] | [100, 96] |
p02712 | u550535134 | 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 if (i%3) !=0 and (i%5) !=0:\n total += i\nprint(total)\n', 'N = int(input())\ntotal = 0\nfor i in range(1, N+1):\n if N%3 == 0 and N%5 == 0:\n total += 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'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s296255874', 's969686875', 's615566208'] | [8960.0, 9168.0, 9156.0] | [22.0, 110.0, 156.0] | [111, 106, 111] |
p02712 | u555503067 | 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())\nret = 0\nfor i in range(1, N):\n if N % 3 != 0 and N % 5 != 0:\n ret += i\nprint(ret)', 'N = int(input())\nret = 0\nfor i in range(1,N+1):\n if i % 3 != 0 and i % 5 != 0:\n ret += i\nprint(ret)'] | ['Wrong Answer', 'Accepted'] | ['s680986429', 's764957309'] | [9160.0, 9168.0] | [197.0, 159.0] | [102, 109] |
p02712 | u556610039 | 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. | ['str = input()\nif str[0] == "7" or str[1] == "7" or str[2] == "7": print("Yes")\nelse: print("No")', 'num = int(input())\nans = 0\nfor x in range(num + 1):\n if x % 3 == 0 or x % 5 == 0: pass\n else: ans += x\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s056374978', 's978167923'] | [9096.0, 9164.0] | [19.0, 164.0] | [96, 119] |
p02712 | u558489851 | 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())\nsol = 0\nfor x in range(1, n+1):\n if x%3 != 0 and x%5 != 0:\n sol += x\nprint(x)', 'n = int(input())\nsol = 0\nfor x in range(1, n+1):\n if x%3 != 0 and x%5 != 0:\n sol += x\nprint(sol)'] | ['Wrong Answer', 'Accepted'] | ['s604706793', 's995938760'] | [9160.0, 9168.0] | [156.0, 142.0] | [98, 100] |
p02712 | u561231954 | 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\ndef main():\n n = int(input())\n arr = np.arange(n + 1)\n arr[3::3] = 0\n arr[5::5] = 0\n print(arr)\n print(arr.sum())\nif __name__ =='__main__':\n main() ", "import numpy as np\ndef main():\n n = int(input())\n arr = np.arange(n + 1)\n arr[3::3] = 0\n arr[5::5] = 0\n print(arr.sum())\nif __name__ =='__main__':\n main() "] | ['Wrong Answer', 'Accepted'] | ['s179508041', 's875050863'] | [34256.0, 34476.0] | [106.0, 103.0] | [189, 174] |
p02712 | u561294476 | 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. | ['FizzBuzz = int(input())\n\nSum = []\nfor i in range(FizzBizz):\n if FizzBuzz[i] % 3 == 0 and FizzBuzz[i] % 5 == 0:\n Sum.append(i)\n else:\n Sum.append(0)\nprint(sum(Sum))\n', 'FizzBizz = int(input())\n\nSum = []\nfor i in range(1, FizzBizz+1):\n if i % 3 != 0 and i % 5 != 0:\n Sum.append(i)\n else:\n Sum.append(0)\nprint(sum(Sum))'] | ['Runtime Error', 'Accepted'] | ['s820784164', 's421455103'] | [9164.0, 33716.0] | [21.0, 199.0] | [184, 168] |
p02712 | u563681808 | 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(1,n+1):\n if i%3==0 or i%5: continue\n res+=i\nprint(res)', 'n = int(input())\nres = 0\nfor i in range(1,n+1):\n if i%3 or i%5: continue\n res+=i\nprint(res)', 'n = int(input())\nres = 0\nfor i in range(1,n+1):\n if i%3==0 or i%5==0: continue\n res+=i\nprint(res)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s287716709', 's361981848', 's994085715'] | [9164.0, 9164.0, 9168.0] | [122.0, 104.0, 149.0] | [96, 93, 99] |
p02712 | u564525445 | 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, os\n\nif __name__ == '__main__':\n N = input()\n s = 0\n for i in range(1, N+1):\n if i % 3 ==0 or i % 5 ==0:\n continue\n else:\n s += i\n print(s)\n", "import sys, os\n\nif __name__ == '__main__':\n N = input()\n s = 0\n for i in range(1, N+1):\n if i % 3 ==0 or i % 5 ==0:\n continue\n else:\n s += i\n print(s)", "import sys, os\n\nif __name__ == '__main__':\n N = int(input())\n s = 0\n for i in range(1, N+1):\n if i % 3 ==0 or i % 5 ==0:\n continue\n else:\n s += i\n print(s)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s204500012', 's608840145', 's308109002'] | [9096.0, 9040.0, 9172.0] | [20.0, 24.0, 158.0] | [199, 198, 203] |
p02712 | u564657854 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\nans = 0\nfor i in range(1, N+1):\n if i % 15 == 0:\n continue\n elif i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n ans += 1\nprint(ans)', 'N = int(input())\nprint("\\n".join(["FizzBuzz" if n % 15 == 0 else "Fizz" if n % 3 == 0 else "Buzz" if n % 5 == 0 else str(n) for n in range(1,N+1)]))', 'N = int(input())\nans = 0\nfor i in range(1, N+1):\n if i % 15 == 0:\n continue\n elif i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n ans+=i\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s267183827', 's609427519', 's190157012'] | [9172.0, 56828.0, 9168.0] | [187.0, 269.0, 191.0] | [199, 148, 197] |
p02712 | u568334289 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['import sys\n\nn = int(sys.argv[1])\ntotal = 0\n\nfor i in range(n):\n\tif (i % 3 != 0) and (i % 5 != 0):\n\t\ttotal += i\n\nprint(total)', 'n = input()\ntotal = 0\n\nfor i in range(n):\n\tif (i % 3 != 0) and (i % 5 != 0):\n\t\ttotal += i\n\nprint(total)', 'n = int(input())\ntotal = 0\n\nfor j in range(n):\n\ti = j+1\n\tif (i % 3 != 0) and (i % 5 != 0):\n\t\ttotal += i\n\nprint(total)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s014040398', 's090914805', 's416620094'] | [9036.0, 9100.0, 9168.0] | [23.0, 22.0, 201.0] | [124, 103, 117] |
p02712 | u570678014 | 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\nx=int256(input())\ns=math.floor(x/3)\nf=math.floor(x/5)\nsf=math.floor(x/15)\n\ns_sum=math.floor(3*s*(s+1)/2)\nf_sum=math.floor(5*f*(f+1)/2)\nsf_sum=math.floor(15*sf*(sf+1)/2)\n\nsum=s_sum+f_sum-sf_sum\nprint(math.floor(sum))\n', 'import math\n\nx=int(input())\ns=math.floor(x/3)\nf=math.floor(x/5)\nsf=math.floor(x/15)\n\ns_sum=3*s*(s+1)/2\nf_sum=5*f*(f+1)/2\nsf_sum=15*sf*(sf+1)/2\n\nsum=s_sum+f_sum-sf_sum\nprint(sum)\n', 'import math\n\nx=int(input())\ns=math.floor(x/3)\nf=math.floor(x/5)\nsf=math.floor(x/15)\nsum=math.floor(x*(x+1)/2)\n\ns_sum=math.floor(3*s*(s+1)/2)\nf_sum=math.floor(5*f*(f+1)/2)\nsf_sum=math.floor(15*sf*(sf+1)/2)\n\nfl=sum-(s_sum+f_sum-sf_sum)\nprint(math.floor(fl))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s111285177', 's464124557', 's674337469'] | [9116.0, 9180.0, 9192.0] | [22.0, 22.0, 21.0] | [229, 178, 256] |
p02712 | u571075527 | 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())\nif(n%3==0):\n if(n%5==0):\n print("FizzBuzz")\n else:\n print("Fizz")\nelse:\n if(n%5==0):\n print("Buzz")\n else:\n print(str(n))', 'def judge(num):\n if(n%3==0):\n if(n%5==0):\n print("FizzBuzz")\n else:\n print("Fizz")\n else:\n if(n%5==0):\n print("Buzz")\n else:\n print(str(n))\n\nn=int(input())\nfor i in range(1,n+1):\n judge(i)', 'def judge(n):\n if(n%3==0):\n if(n%5==0):\n print("FizzBuzz",end="")\n else:\n print("Fizz",end="")\n else:\n if(n%5==0):\n print("Buzz",end="")\n else:\n print(str(n),end="")\n\nm=int(input())\nfor i in range(1,m+1):\n judge(i)', 'def could_divide(num):\n return (num%3==0 or num%5==0)\nn=int(input())\nanswer=0\nfor i in range(1,n+1):\n if(not could_divide(i)):\n answer+=i\nprint(answer)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s143247717', 's372120491', 's726200284', 's546004719'] | [9016.0, 9788.0, 9252.0, 9116.0] | [20.0, 534.0, 495.0, 198.0] | [152, 223, 249, 156] |
p02712 | u571537830 | 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):\n if i%3 == 0 and i%5 == 0:\n sum = sum\n else:\n sum += i\n\nprint(sum)\n', 'n = int(input())\nsum = 0\n\nfor i in range(1, n+1):\n if i%3 != 0 and i%5 != 0:\n sum += i\n\nprint(sum)\n'] | ['Wrong Answer', 'Accepted'] | ['s170548451', 's447752796'] | [9000.0, 9096.0] | [170.0, 157.0] | [135, 109] |
p02712 | u581403769 | 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\ncount = 0\nfor in range(n):\n if i % 3 > 0 and i % 5 > 0:\n count += i\n \nprint(count)', 'n = int(input())\n\ncount = 0\nfor i in range(n + 1):\n if i % 3 > 0 and i % 5 > 0:\n count += i\n \nprint(count)\n'] | ['Runtime Error', 'Accepted'] | ['s239523665', 's529472470'] | [8928.0, 9028.0] | [26.0, 158.0] | [117, 124] |
p02712 | u581603131 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\nans = 0\nfor i in range(1,N+1):\n if i%3!=0 and i%5!=0 :\n ans += 1\nprint(ans)', 'N = int(input())\nans = 0\nfor i in range(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(N+1):\n if i%3!=0 or i%5!=0:\n ans += i\nprint(ans)', "N = input()\nprint('Yes' if '7' in N else 'No') ", 'N = int(input())\nans = 0\nfor i in range(0,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(N+1):\n if i%3!=0 and i%5!=0 :\n ans += i\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s214815757', 's394438361', 's513009453', 's590547413', 's779297607', 's327035664'] | [9168.0, 9104.0, 8964.0, 9028.0, 9168.0, 9168.0] | [149.0, 153.0, 163.0, 22.0, 145.0, 150.0] | [102, 100, 92, 47, 102, 100] |
p02712 | u586857375 | 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())\nnone_num = [i for i in range(1, N+1) if i%3 != 0 and i%5 != 0]\nnone = sum(none_num)', 'K = int(input())\nx = (K+1) * K//2\nnum_devisible_three = (3+3*(K//3))*(K//3)//2\nnum_devisible_five = (5+5*(K//5))*(K//5)//2\nnum_devisible_fifteen = (15+15*(K//15))*(K//15)//2\nprint(x-num_devisible_three-num_devisible_five+num_devisible_fifteen)'] | ['Wrong Answer', 'Accepted'] | ['s896298847', 's757018648'] | [30024.0, 9180.0] | [113.0, 24.0] | [100, 243] |
p02712 | u588557741 | 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\nnumber = int(input())\nTotal = []\n\nfor i in range(1, number + 1):\n if number % 3 == 0 and i % 5 == 0:\n print("FizzBuzz")\n elif i % 3 ==0:\n print("Fizz")\n elif i % 5 == 0:\n print("Buzz")\n else:\n Total.append(i)\n\nprint(sum(Total))\n', 'number = int(input())\nTotal = []\n\nfor i in range(1, number + 1):\n if number % 3 == 0 and i % 5 ==0:\n "FizzBuzz"\n elif i % 3 ==0:\n "Fizz"\n elif i % 5 == 0:\n "Buzz"\n else:\n Total.append(i)\n\nprint(sum(Total))\n'] | ['Wrong Answer', 'Accepted'] | ['s537931018', 's384949864'] | [29820.0, 29988.0] | [315.0, 219.0] | [378, 246] |
p02712 | u588575394 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = input()\nsum = 0\nfor i in range(1, N+1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n\nprint(sum)\n', '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)\n'] | ['Runtime Error', 'Accepted'] | ['s045337868', 's867339112'] | [9092.0, 9160.0] | [21.0, 159.0] | [107, 112] |
p02712 | u590198086 | 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(1,n+1)]\nl = list(filter(lambda x: x%3 != 0,l))\nl = list(filter(lambda x; x%5 != 0,l))\nprint(sum(l))', 'n = int(input())\nl = [i for i in range(1,n+1)]\nl = list(filter(lambda x: x%3 != 0,l))\nl = list(filter(lambda x: x%5 != 0,l))\nprint(sum(l))\n'] | ['Runtime Error', 'Accepted'] | ['s104909388', 's490478253'] | [8896.0, 53516.0] | [22.0, 224.0] | [138, 139] |
p02712 | u594862874 | 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()\nS = 0\nfor i in range(1, N+1):\n\tif i%3==0 or i%5==0 or (i%3==0 and i%5==0 ):\n continue\n S += i\n \nprint(S)', 'N = input()\nS = 0\nfor i in range(1, N+1):\n\tif i%3==0 or i%5==0:\n continue\n S += i\n \nprint(S)', 'N = int(input())\nS = 0\nfor i in range(1, N+1):\n if i%3==0 or i%5==0 or (i%3==0 and i%5==0):\n continue\n S+=i\nprint(S)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s396276300', 's649590823', 's836597680'] | [9020.0, 8956.0, 9164.0] | [22.0, 21.0, 182.0] | [127, 103, 129] |
p02712 | u596536048 | 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. | ['term = int(input())\nsum = 0\nfor i in range(1, N + 1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\nprint(sum)', 'N = int(input())\nl = [i for i in range(1, int(input()) + 1) if i % 3 != 0 and i % 5 != 0]\ns = sum(l)\nprint(s)', 'N = int(input())\nl = i for i in range(1, int(input()) + 1) if i % 3 != 0 and i % 5 != 0\ns = sum(l)\nprint(s)', 'N = int(input())\nl = [i for i in range(1, N + 1) if i % 3 != 0 and i % 5 != 0]\ns = sum(l)\nprint(s)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s295351731', 's296509593', 's368548371', 's196109339'] | [9076.0, 9056.0, 8864.0, 29920.0] | [25.0, 23.0, 23.0, 121.0] | [115, 109, 107, 98] |
p02712 | u597455618 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\nans = 0\nfor i in range(1. n+1):\n if i%3 == 0 or i%5 == 0:\n 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'] | ['s230241376', 's141048780'] | [9012.0, 9016.0] | [21.0, 147.0] | [105, 106] |
p02712 | u599547273 | 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_num = 0\nfor i in range(1, N+1):\n if N%3 and N%5:\n sum_num += i\n\nprint(sum_num)', 'N = int(input())\n\nsum_num = 0\nfor i in range(1, N+1):\n if (i%3) and (i%5):\n sum_num += i\n\nprint(sum_num)'] | ['Wrong Answer', 'Accepted'] | ['s262258831', 's464290077'] | [9056.0, 9128.0] | [184.0, 148.0] | [110, 114] |
p02712 | u599620638 | 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. | ['#!/usr/bin/env python\n\nimport sys\n\nN = int(sys.stdin.readline())\n\nnfizz = N // 3\nnbuzz = N // 5\nnfizzbuzz = N // 15\n\ntot = (1 + N) * N / 2\ntot_fizz = 3 * (1 + nfizz) * nfizz / 2\ntot_buzz = 5 * (1 + nbuzz) * nbuzz / 2\ntot_fizzbuzz = 15 * (1 + nfizzbuzz) * nfizzbuzz / 2\n\ntot = tot - (tot_fizz + tot_buzz - tot_fizzbuzz)\n\nprint(tot)\n\n\n', '#!/usr/bin/env python\n\nimport sys\n\nN = int(sys.stdin.readline())\n\nnfizz = N // 3\nnbuzz = N // 5\nnfizzbuzz = N // 15\n\ntot = (1 + N) * N // 2\ntot_fizz = 3 * (1 + nfizz) * nfizz // 2\ntot_buzz = 5 * (1 + nbuzz) * nbuzz // 2\ntot_fizzbuzz = 15 * (1 + nfizzbuzz) * nfizzbuzz // 2\n\ntot = tot - (tot_fizz + tot_buzz - tot_fizzbuzz)\n\nprint(tot)\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s743243149', 's847389338'] | [9184.0, 9188.0] | [23.0, 20.0] | [333, 337] |
p02712 | u600261652 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\ncount = 0\nfor i in range(1, N+1):\n if N%3 != 0 and N%5 != 0:\n count = count + i\nprint(count)\n', 'N = int(input())\ncount = 0\nfor i in range(1, N+1):\n if N%3 != 0 and N%5 != 0:\n count = count + 1\nprint(count)', 'N = int(input())\ncount = 0\nfor i in range(1, N+1):\n if i%3 != 0 and i%5 != 0:\n count = count + i\nprint(count)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s420451090', 's786542226', 's957585038'] | [9160.0, 9136.0, 9164.0] | [210.0, 190.0, 154.0] | [114, 113, 113] |
p02712 | u604269317 | 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)\nfizz=[]\nfor x in i:\n if x % 3 ==0 and x%5==0:\n return \n elif x % 3==0:\n return\n elif x%5==0:\n return \n else:\n fizz.append(i)\nprint(sum(fizz))', 'i = int(input())\nfizz=[]\nfor x in range(1, i+1):\n if x % 3 ==0 and x%5==0:\n continue\n elif x % 3==0:\n continue\n elif x%5==0:\n continue \n else:\n fizz.append(x)\nprint(fizz)\nprint(sum(fizz))', 'i = int(input())\nfizz=[]\nfor x in range(i):\n if x % 3 ==0 and x%5==0:\n continue\n elif x % 3==0:\n continue\n elif x%5==0:\n continue \n else:\n fizz.append(x)\nprint(fizz)\nprint(sum(fizz))', 'i = int(input())\nfizz=[]\nfor x in range(1, i+1):\n if x % 3 ==0 and x%5==0:\n continue\n elif x % 3==0:\n continue\n elif x%5==0:\n continue \n else:\n fizz.append(x)\nprint(sum(fizz))'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044727953', 's918593908', 's996040079', 's470949351'] | [9100.0, 38224.0, 38368.0, 30020.0] | [24.0, 284.0, 269.0, 229.0] | [172, 203, 198, 191] |
p02712 | u609093494 | 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(15))\ncount = 0\nfor i in range(1,n):\n if i%3!=0 and i%5!=0:\n count+=i\nprint(count)', 'n = int(input())\ncounter = 0\nfor i in range(1,n+1):\n if i%3==0 or i%5==0:\n counter+=0\n else: \n counter+=i\n \nprint(counter)'] | ['Wrong Answer', 'Accepted'] | ['s321969031', 's315893336'] | [9168.0, 9168.0] | [153.0, 184.0] | [99, 132] |
p02712 | u610440063 | 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())\nans = 0\nfor i in range(x+1):\n if (i%3 != 0) and (i%5 != 0):\n a += i\n\nprint(a)', 'x = int(input())\nans = 0\nfor i in range(x+1):\n if (i%3 != 0) and (i%5 != 0):\n ans += i\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s873232265', 's256340508'] | [9160.0, 9168.0] | [22.0, 160.0] | [102, 106] |
p02712 | u611090896 | 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())\nx = 0\nfor i in range(1,1+N):\n if N % 3 != 0 or N%5 !=0:\n x += i\nprint(x)\n', 'N = int(input())\nx=0\nfor i in range(1,1+N):\n if N % 3 != 0 and N%5 !=0:\n x += i\nprint(x)\n', 'N = int(input())\nx=0\nfor i in range(1,1+N):\n if (N % 3) != 0 or (N%5) !=0:\n x = x + i\nprint(x)\n', 'N = int(input())\nx=0\nfor i in range(1,1+N):\n if (N % 3) != 0 and (N % 5) !=0:\n x = x + i\nprint(x)\n', 'N = int(input())\nfor i in range(1,1+N):\n if N % 3 != 0 or N%5 !=0:\n x += i\nprint(x)', 'N = int(input())\nx=0\nfor i in range(1,1+N):\n if N % 3 != 0 or N%5 !=0:\n x = x + i\nprint(x)\n', 'N = int(input())\nfor i in range N:\n if i % 3 ==0 or i % 5 ==0:\n x += i\nprint(x)\n ', 'N = int(input())\nx=0\nfor i in range(1,1+N):\n if N % 3 != 0 and N%5 !=0:\n x = x + i\nprint(x)\n', 'N = int(input())\nx = 0\nfor i in range(1, N+1):\n if (i % 3) != 0 and (i % 5) != 0:\n x = x+i\nprint(x)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s046929473', 's076076976', 's106583425', 's184017770', 's350709394', 's497319287', 's534238137', 's611242465', 's396343062'] | [9164.0, 9152.0, 9160.0, 9124.0, 9156.0, 9188.0, 9012.0, 9160.0, 9036.0] | [170.0, 188.0, 161.0, 200.0, 24.0, 162.0, 22.0, 187.0, 154.0] | [94, 93, 99, 102, 87, 95, 86, 96, 109] |
p02712 | u612635771 | 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())\nfor i in range(1, n+1):\n if i%3!==0 and i%5!==0:\n a+=i\nprint(i)', 'n = int(input())\nfor i in range(1, n+1):\n if i%3!=0 and i%5!=0:\n a+=i\nprint(i)', '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\nprint(i)', '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\nprint(a)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s051251321', 's154935536', 's481167164', 's150717021'] | [8804.0, 9088.0, 8908.0, 9060.0] | [28.0, 23.0, 159.0, 157.0] | [84, 82, 87, 87] |
p02712 | u614320306 | 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 // 3\nb = N // 5\nc = N // 15\n\nd = 3*a*(a+1)/2\ne = 3*b*(b+1)/2\nf = 3*c*(c+1)/2\n\ng = N*(N+1)/2\n\nprint(g-d-e+f)', 'N = int(input())\n\nimport math\n \na = N // 3\nb = N // 5\nc = N // 15\n \nd = 3*a*(a+1)/2\ne = 5*b*(b+1)/2\nf = 15*c*(c+1)/2\n \ng = N*(N+1)/2\n \nprint(math.floor(g-d-e+f))'] | ['Wrong Answer', 'Accepted'] | ['s582948037', 's069392180'] | [9184.0, 9184.0] | [21.0, 23.0] | [131, 161] |
p02712 | u616468898 | 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([i for i in range(1, int(input())+1) if i % 3 != 0 and i % 5 != 0])', 'print(sum([i for i in range(1, int(input())+1) if i % 3 != 0 and i % 5 != 0]))'] | ['Wrong Answer', 'Accepted'] | ['s096001503', 's173263315'] | [30100.0, 29808.0] | [110.0, 109.0] | [71, 78] |
p02712 | u619677540 | 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()\ni = 1\nresult = 0\nwhile (i <= n):\n if (i % 3 == 0 || i % 5 == 0):\n result += i\nprint(result)', 'n = input()\ni = 1\nresult = 0\nwhile (i <= n):\n if (i % 3 != 0 and i % 5 != 0):\n result += i\n i += 1\nprint(result)', 'n = int(input())\ni = 1\nresult = 0\nwhile (i <= n):\n if (i % 3 != 0 and i % 5 != 0):\n result += i\n i += 1\nprint(result)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s574441817', 's620953801', 's079958824'] | [9016.0, 9100.0, 9156.0] | [22.0, 25.0, 194.0] | [107, 117, 123] |
p02712 | u619809897 | 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()\nlit_N = []\nfor i in range(int(N)+1):\n if i % 5 == 0 and i % 3 == 0:\n lit_N.append("FizzBuzz")\n elif i % 3 == 0:\n lit_N.append("Fizz")\n elif i % 5 == 0:\n \tlit_N.append("Buzz")\n else:\n lit_N.append(i)\nprint(sum(filter(int, lit_N[1:])))', 'N = input()\nlit_N = []\nfor i in range(int(N)+1):\n if i % 5 == 0 and i % 3 == 0:\n lit_N.append("FizzBuzz")\n elif i % 3 == 0:\n lit_N.append("Fizz")\n elif i % 5 == 0:\n \tlit_N.append("Buzz")\n else:\n lit_N.append(i)\nprint(sum(list(filter(lambda x: isinstance(x,int), lit_N))))'] | ['Runtime Error', 'Accepted'] | ['s952643693', 's993597141'] | [41400.0, 37740.0] | [249.0, 309.0] | [259, 285] |
p02712 | u620238824 | 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 = []\nfor i in range(1,N):\n# print(i)\n if i % 3 == 0:\n A.append(0)\n elif i % 5 == 0:\n\t\tA.append(0)\n else:\n A.append(i)\n \nprint(sum(A))', 'N = int(input())\n\nsum = 0\nfor i in range(1, N + 1):\n if i % 3 == 0:\n continue\n elif i % 5 == 0:\n continue\n else:\n sum += i\n\nprint(sum)'] | ['Runtime Error', 'Accepted'] | ['s192579855', 's445944723'] | [9032.0, 9068.0] | [19.0, 155.0] | [229, 164] |
p02712 | u626228246 | 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())\nseq = [i for in range(1,N) \ncount = 0\nfor t in range(len(seq)):\n if seq[t]%3 != 0 or seq[t]%5 != 0:\n count += seq[t]\nprint(count)', 'N = int(input())\nseq = [i for i in range(1,N+1)]\ncount = 0\nfor t in range(0,N):\n\tif seq[t]%3 != 0 and seq[t]%5 != 0:\n\t\tcount += seq[t]\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s142423050', 's523167131'] | [8772.0, 48556.0] | [25.0, 262.0] | [153, 147] |
p02712 | u626529075 | 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\nx = int(n / 15)\nfor i in range(x):\n ans += 15 + i * 8 * 15\n\namari = n % 15\n\nplus = int(n / 15) * 15\n\nif amari == 1:\n ans += plus + 1\nelif amari == 2 or amari == 3:\n ans += plus + plus + 3\nelif amari == 4 or amari == 5 or amari == 6:\n ans += plus + plus + plus + 7\nelif amari == 7:\n ans += plus + plus + plus + plus + 14\nelif amari == 8 or amari == 9 or amari == 10:\n ans += plus + plus + plus + plus + plus + 22\nelif amari == 11 or amari == 12:\n ans += plus + plus + plus + plus + plus + plus + 33\nelif amari == 13:\n ans += plus + plus + plus + plus + plus + plus + plus + 46\nelif amari == 14:\n ans += plus + plus + plus + plus + plus + plus + plus + plus + 60\n\nprint(ans)', 'n = int(input())\nans = 0\nx = int(n / 15)\nfor i in range(x):\n ans += 60 + i * 8 * 15\n\namari = n % 15\n\nplus = int(n / 15) * 15\n\nif amari == 1:\n ans += plus + 1\nelif amari == 2 or amari == 3:\n ans += plus + plus + 3\nelif amari == 4 or amari == 5 or amari == 6:\n ans += plus + plus + plus + 7\nelif amari == 7:\n ans += plus + plus + plus + plus + 14\nelif amari == 8 or amari == 9 or amari == 10:\n ans += plus + plus + plus + plus + plus + 22\nelif amari == 11 or amari == 12:\n ans += plus + plus + plus + plus + plus + plus + 33\nelif amari == 13:\n ans += plus + plus + plus + plus + plus + plus + plus + 46\nelif amari == 14:\n ans += plus + plus + plus + plus + plus + plus + plus + plus + 60\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s919753281', 's811860826'] | [9236.0, 9232.0] | [34.0, 29.0] | [724, 724] |
p02712 | u629454253 | 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):\n if i % 3 != 0 and i % 5 != 0:\n 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 += i\n\nprint(sum)\n'] | ['Runtime Error', 'Accepted'] | ['s660558285', 's583716672'] | [9096.0, 9156.0] | [20.0, 156.0] | [101, 107] |
p02712 | u629540524 | 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())\nif n / 15 == 0:\n n = 8\nelif n / 3 == 0:\n n = 4\nelif n / 5 == 0:\n n = 4\n total = 0\n for i in range(1, n +1):\n total += i\n print(total)', 'n = int(input())\ntotal = 0\nfor i in range(n+1):\n if i % 3 != 0 and i % 5 != 0:\n total += i\nprint(total)'] | ['Wrong Answer', 'Accepted'] | ['s473301960', 's720542877'] | [9120.0, 9152.0] | [20.0, 152.0] | [179, 113] |
p02712 | u630467326 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\n\nans = 0\n\nfor i in range(1, n + 1):\n if i % 3 != 0 or i % 5 != 0:\n ans += i\n\nprint(ans)', 'n = int(input())\n\nans = 0\n\nfor i in range(1, n + 1):\n if i % 3 != 0 ans i % 5 != 0:\n ans += i\n\nprint(ans)', 'n = int(input())\n\nans = 0\n\nfor i in range(1, n + 1):\n if i % 3 != 0 and i % 5 != 0:\n ans += i\n\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s216847583', 's362089954', 's399799963'] | [9060.0, 8908.0, 8952.0] | [164.0, 26.0, 168.0] | [108, 109, 109] |
p02712 | u631081667 | 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(sum([i for i in range(int(input()+1)) if (i % 3 != 0 and i % 5 != 0)]))\n', 'print(sum([i for i in range(int(input())+1) if (i % 3 != 0 and i % 5 != 0)]))\n'] | ['Runtime Error', 'Accepted'] | ['s004490931', 's500039783'] | [9088.0, 29924.0] | [21.0, 111.0] | [78, 78] |
p02712 | u631579948 | 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\nN=1\nfor i in range(N):\n N+=1\n if N//3 and N//5:\n pass\n elif N//3:\n pass\n elif N//5:\n pass\n else:\n ans=ans+N\nprint(ans) \n \n \n ', 'N=int(input())\nlist_=[]\nM=0\nfor i in range(N):\n M=M+1\n if M%3!=0 and M%5!=0:\n list_.append(M)\n\nprint(sum(list_)) \n'] | ['Wrong Answer', 'Accepted'] | ['s911003725', 's979095351'] | [9160.0, 30132.0] | [21.0, 218.0] | [172, 130] |
p02712 | u633463117 | 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, m = map(int, input().split())\na = list(map(int, input().split()))\na.sort()\nprint(a)\nif a[-m] > 1 / (4 * m):\n print("Yes")\nelse:\n print("No")', 'n = int(input())\ntmp, ans = 0, 0\n\nwhile tmp < n:\n tmp = tmp + 1\n if tmp % 3 != 0 and tmp % 5 != 0:\n ans = ans + tmp\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s233913296', 's956791595'] | [9156.0, 9072.0] | [22.0, 201.0] | [149, 139] |
p02712 | u634965946 | 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 = longlong(input())\n\na = 0\n\n\nfor i in n:\n\tif(n%i*3 == 0 and n%i*5 == 0):\n a += i\n elif(n%i*3 == 0):\n a += i\n elif(n%i*5 == 0):\n a += i\nprint(i)\n \n \n ', 'n = int(input())\n\na = 0\n\n\nfor i in range(1,n+1):\n \n if(i%3 == 0 or i%5 == 0):\n pass\n else:\n a += i\nprint(a)\n'] | ['Runtime Error', 'Accepted'] | ['s408211473', 's754666545'] | [9016.0, 9160.0] | [22.0, 149.0] | [178, 117] |
p02712 | u635540732 | 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\nN=n*(1+n)//2\nprint(N-3*a-5*b+15*c)', 'n=int(input())\na=n//3\nb=n//5\nc=n//15\nN=n*(1+n)//2\nA=3*a*(1+a)//2\nB=5*b*(1+b)//2\nC=15*c*(1+c)//2\nprint(N-A-B+C)'] | ['Wrong Answer', 'Accepted'] | ['s015214924', 's719782063'] | [9172.0, 9184.0] | [24.0, 23.0] | [71, 110] |
p02712 | u641545507 | 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\nN_list = list(range(1, N + 1))\n\nans = 0\n\nfor i in N_list:\n if not i % 3 == 0 or i % 5 == 0:\n ans += i\nprint(ans)', 'N = int(input())\n\nN_list = list(range(1, N + 1))\n\nans = 0\n\nfor i in N_list:\n if not (i % 3 == 0 or i % 5 == 0):\n ans += i\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s716481233', 's670522971'] | [48252.0, 48476.0] | [186.0, 193.0] | [140, 142] |
p02712 | u643679148 | 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 = sum([i for i in range(n) if i % 3 != 0 or i % 5 != 0])\nprint(ans)\n', 'n = int(input())\nans = sum([i for i in range(n) if i % 3 == 0 or i % 5 == 0])\nprint(ans)\n', 'n = int(input())\nans = sum([i for i in range(n+1) if i % 3 != 0 and i % 5 != 0])\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s519853491', 's740213549', 's980421294'] | [46028.0, 27276.0, 29976.0] | [119.0, 109.0, 114.0] | [89, 89, 92] |
p02712 | u644126199 | 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. | ['line = input()\nif int(line) %3 ==0and int(line)%5==0:\n print("FizzBuzz")\nelif int(line) %3 ==0:\n print("Fizz")\nelif int(line) %5 ==0:\n print("Buzz")\nelse:\n print(int(line))\n', 'line = input()\ncnt =0\nfor i in range(1,1+int(line)):\n if i %3 !=0:\n if i %5 !=0:\n cnt +=i\n \nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s993545439', 's111354532'] | [9168.0, 9160.0] | [21.0, 169.0] | [178, 118] |
p02712 | u644516473 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ["s = input()\nans = 'Yes' if '7' in s else 'No'\nprint(ans)\n", 'n = int(input())\nprint(sum(i for i in range(1, n+1) if i % 3 != 0 and i % 5 != 0))\n'] | ['Wrong Answer', 'Accepted'] | ['s020057336', 's038356193'] | [9020.0, 9156.0] | [19.0, 105.0] | [57, 83] |
p02712 | u644568755 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\ncount = 0\nfor i in range(n):\n if (n % 3 != 0) and (n % 5 != 0):\n count += i\nprint(count)', 'n = int(input())\ncount = 0\nfor i in range(n+1):\n if (i % 3 != 0) and (i % 5 != 0):\n count += i\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s154612132', 's862460382'] | [9120.0, 9120.0] | [201.0, 158.0] | [109, 111] |
p02712 | u645487439 | 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 % 3 != 0 && i % 5 != 0:\n sum += i\n\nprint(sum)\n', 'n = int(input())\nsum = 0\n\nfor i in range(1, n + 1):\n if i % 3 != 0 and i % 5 != 0:\n sum += i\n\nprint(sum)\n'] | ['Runtime Error', 'Accepted'] | ['s495808678', 's888393464'] | [8952.0, 9092.0] | [22.0, 156.0] | [114, 115] |
p02712 | u646203242 | 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=[i for i in range(N+1)]\nfor i in range(N+1):\n if i%3==0 or i%5==0:\n a[i]=0\nsum(a)', 'N=int(input())\na=[i for i in range(N+1)]\nfor i in range(N+1):\n if i%3==0 or i%5==0:\n del(a[i])\nsum(a)', 'N=int(input())\na=[i for i in range(N+1)]\nfor i in range(N+1):\n if i%3==0 or i%5==0:\n a[i]=0\nprint(sum(a))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s437219609', 's820350471', 's384230784'] | [48500.0, 48580.0, 48540.0] | [201.0, 2207.0, 203.0] | [102, 105, 109] |
p02712 | u649529164 | 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 or i%5 != 0:\n cnt+=i\nprint(cnt)\n', 'n=int(input())\ncnt=0\nfor i in range(1,n+1):\n if i%3 != 0:\n if i%5 != 0:\n cnt+=i\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s144146489', 's325617882'] | [9156.0, 9180.0] | [164.0, 156.0] | [99, 112] |
p02712 | u651058930 | 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//15*3)', 'N = int(input())\n\nprint(sum(filter(lambda x : (x%3 != 0) or (x%5 !=0), range(N)))) \n\n', 'N = int(input())\n\nprint(sum(filter(lambda x : x%3 != 0 or x%5 !=, range(N)))) \n\n', 'N = int(input())\na = 0\nfor i in range(1, N+1):\n if i%3 != 0 and i%5 != 0:\n a += i\n\nprint(a)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s240589871', 's472585635', 's976461108', 's975186359'] | [9064.0, 9068.0, 8900.0, 9092.0] | [22.0, 130.0, 23.0, 154.0] | [31, 85, 80, 101] |
p02712 | u651732093 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\n\nl=list(range(1,n+1))\nprint(l)\n\ncount=0\n\nfor i in range(1,n+1) :\n if i%3!=0 and i%5!=0:\n count += i\nprint(count) \n \n ', 'n = int(input())\n\nl=list(range(1,n+1))\n\ncount=0\n\nfor i in range(1,n+1) :\n if i%3!=0 and i%5!=0:\n count += i\nprint(count) \n \n '] | ['Wrong Answer', 'Accepted'] | ['s118499959', 's794238509'] | [65740.0, 48472.0] | [286.0, 211.0] | [154, 145] |
p02712 | u665873062 | 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())\nFBSum = 0\nfor i in N:\n j = i+1\n if j % 3 != 0 and j % 5 != 0:\n FBSum +=j\n\nprint(FBSum)', 'N = int(input())\nFBSum = 0\nfor i in range(N):\n j = i+1\n if j % 3 != 0 and j % 5 != 0:\n FBSum +=j\n\nprint(FBSum)'] | ['Runtime Error', 'Accepted'] | ['s610349021', 's017856858'] | [9020.0, 9168.0] | [24.0, 201.0] | [112, 123] |
p02712 | u668503853 | 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 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+=1\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'] | ['s761156850', 's865600491', 's250492427'] | [9048.0, 9096.0, 9052.0] | [146.0, 152.0, 155.0] | [88, 88, 88] |
p02712 | u668642853 | 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 = input()\nsum = 0\nfor i in range(x+1):\n if i % 3 or i % 5:\n pass\n else:\n sum += i\nprint(sum)', 'x = input()\nsum = 0\nfor i in range(x):\n if i % 3 or i % 5:\n pass\n else:\n sum += i\nprint(sum)\n ', 'x = int(input())\nsum = 0\nfor i in range(x+1):\n if i % 3 or i % 5:\n pass\n else:\n sum += i\nprint(sum)', 'x = int(input())\nsum = 0\nfor i in range(x+1):\n if i % 3 == 0 or i % 5 == 0:\n pass\n else:\n sum += i\nprint(sum)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s115957400', 's630871882', 's813281974', 's204332930'] | [9036.0, 9092.0, 9164.0, 9100.0] | [22.0, 23.0, 96.0, 152.0] | [114, 105, 119, 129] |
p02712 | u669141618 | 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 = n*(n+1)/2\nuc = n/3\nbes = n/5\nonbes = n/15\nprint(res - 3*uc*(uc+1)/2 - 5*bes*(bes+1)/2 + 15*onbes*(onbes+1)/2)', 'n = int(input())\nres = n*(n+1)//2\nuc = n//3\nbes = n//5\nonbes = n//15\nprint(res - 3*uc*(uc+1)//2 - 5*bes*(bes+1)//2 + 15*onbes*(onbes+1)//2)\n'] | ['Wrong Answer', 'Accepted'] | ['s169148336', 's392889309'] | [9176.0, 9084.0] | [22.0, 22.0] | [132, 140] |
p02712 | u671446913 | 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 n%15 !=0:\n sum += i\n \nprint(sum_)', 'n = int(input())\n\nsum_ = 0\nfor i in range(1, n+1):\n if i%15 !=0:\n sum += i\n \nprint(sum_)', 'n = int(input())\n\nsum_ = 0\nfor i in range(1, n+1):\n if i%15 !=0 and i%3 !=0 and i%5 !=0:\n sum_ += i\n \nprint(sum_)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s644230373', 's704883227', 's366373113'] | [9160.0, 9100.0, 9164.0] | [20.0, 21.0, 176.0] | [95, 95, 120] |
p02712 | u672542358 | 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=n*(n+1)//2\nk=n//3\nl=n//5\nm=n//15\nk=k*(k+1)//2\nl=l*(l+1)//2\nm=m*(m+1)//2\nans=ans-k-l+m\nprint(ans)', 'n=int(input())\nans=n*(n+1)//2\nk=n//3\nl=n//5\nm=n//15\nk=k*(k+1)*3//2\nl=l*(l+1)*5//2\nm=m*(m+1)*15//2\nans=ans-k-l+m\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s741589512', 's344935895'] | [9180.0, 9184.0] | [22.0, 21.0] | [115, 122] |
p02712 | u674190122 | 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. | ['given = [int(x) for x in range(1, int(input()) + 1) if x % 3 != 0 or x % 5 != 0]\nprint(sum(given))\n\n', 'given = int(input())\nsums = 0\nfor i in range(1, given + 1):\n if i % 15 == 0:continue\n if i % 3 == 0:continue\n if i % 5 == 0:continue\n sums += i\nprint(sums)\n'] | ['Wrong Answer', 'Accepted'] | ['s986773008', 's483390693'] | [46040.0, 9164.0] | [170.0, 198.0] | [100, 168] |
p02712 | u678505520 | 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(n+1):\n if n % 3 != 0 and n % 5 != 0:\n total += n\n \nprint(total)', 'n = int(input())\ntotal = 0\nfor i in range(n+1):\n if i % 3 != 0 and i % 5 != 0:\n total += i\n \nprint(total)'] | ['Wrong Answer', 'Accepted'] | ['s101567204', 's455998390'] | [9168.0, 9124.0] | [201.0, 156.0] | [112, 112] |
p02712 | u681197547 | 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\ns = 0\nfor n in range(1, N+1):\n if n % 3 != 0 and n % 5 != 0:\n s += n\nprint(s)', 'N = int(input())\n \ns = 0\nfor n in range(1, N+1):\n if n % 3 != 0 and n % 5 != 0:\n s += n\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s695874270', 's677885368'] | [9092.0, 9160.0] | [24.0, 150.0] | [100, 106] |
p02712 | u681390786 | 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())\nan=[a for a in range(1,n+1)]\no=[]\ndef ass(an):\n for c in an\n if c%3==0 or c%5==0:\n continue\n else:\n o.append(c)\n return sum(o)\nprint(ass(an))', 'n=int(input())\nan=[a for a in range(1,n+1)]\no=[]\ndef ass(an):\n for c in an:\n if c%3==0 or c%5==0:\n continue\n else:\n o.append(c)\n return sum(o)\nprint(ass(an))'] | ['Runtime Error', 'Accepted'] | ['s431808058', 's651599319'] | [9032.0, 52576.0] | [25.0, 200.0] | [199, 200] |
p02712 | u681502232 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ["n=int(input())\n\nfor i in n:\n \n if i %15==0:\n print('Fizz Buzz')\n elif i % 3==0:\n print('Fizz')\n elif i % 5 ==0:\n print('Buzz')\n else:\n print(i)\n", "n = int(input())\nsum=0\n\nfor i in range(1,n+1):\n if i % 15 == 0:\n print('Fizz Buzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n\t\tsum=sum+i", "n = int(input())\n\nfor i in range(1,n+1):\n if i % 15 == 0:\n print('Fizz Buzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n sum=sum+i", "n=int(input())\n\nfor i in range(1,n+1):\n\n if i %15==0:\n print('Fizz Buzz')\n elif i % 3==0:\n print('Fizz')\n elif i % 5 ==0:\n print('Buzz')\n else:\n print(i)\n", "n = int(input())\n\nfor i in range(1,n+1):\n if i % 15 == 0:\n print('Fizz Buzz')\n elif i % 3 == 0:\n print('Fizz')\n elif i % 5 == 0:\n print('Buzz')\n else:\n print(i)", 'n = int(input())\nsum = 0\n\nfor i in range(1, n + 1):\n\n if i % 3 != 0 and i % 5 != 0:\n sum = sum + i\n\nprint(sum)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s393832410', 's410564446', 's457352394', 's701646813', 's754503067', 's240417284'] | [9028.0, 9036.0, 9172.0, 9380.0, 9396.0, 9100.0] | [21.0, 21.0, 26.0, 408.0, 422.0, 163.0] | [185, 201, 201, 194, 200, 120] |
p02712 | u684267998 | 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\nfor i in range(1, n + 1):\n if i % 3 and i % 5:\n answer += i\n print(i)\nprint(answer)', 'n = int(input())\nanswer = 0\nfor i in range(1, n + 1):\n if i % 3 and i % 5:\n answer += i\n\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s260154407', 's349997743'] | [9292.0, 9164.0] | [310.0, 144.0] | [128, 112] |
p02712 | u685244071 | 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())\nall_sum = n * (n + 1)/2\n\nnumber_3 = n//3\nnumber_5 = n//5\nnumber_15 = n//15\n\nsum_number_3 = number_3 * (number_3 + 1)/2\nsum_number_5 = number_5 * (number_5 + 1)/2\nsum_number_15 = number_15 * (number_15 + 1)/2\n\nsum_not_number = sum_number_3 + sum_number_5 - sum_number_15\n\ns = all_sum - sum_not_number\n\nprint(s)', 'n = int(input())\nall_sum = n * (n + 1)/2\n\nnumber_3 = n//3\nnumber_5 = n//5\nnumber_15 = n//15\n\nsum_number_3 = 3 * (number_3 * (number_3 + 1)/2)\nsum_number_5 = 5 * (number_5 * (number_5 + 1)/2)\nsum_number_15 = 15 * (number_15 * (number_15 + 1)/2)\n\nsum_not_number = sum_number_3 + sum_number_5 - sum_number_15\n\ns = all_sum - sum_not_number\n\nprint(s)\n', 'n = int(input())\nall_sum = n * (n + 1)//2\n\nnumber_3 = n//3\nnumber_5 = n//5\nnumber_15 = n//15\n\nsum_number_3 = 3 * (number_3 * (number_3 + 1)//2)\nsum_number_5 = 5 * (number_5 * (number_5 + 1)//2)\nsum_number_15 = 15 * (number_15 * (number_15 + 1)//2)\n\nsum_not_number = sum_number_3 + sum_number_5 - sum_number_15\n\ns = all_sum - sum_not_number\n\nprint(s)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s174046517', 's725885326', 's386613882'] | [9164.0, 9192.0, 9192.0] | [23.0, 23.0, 23.0] | [326, 346, 350] |
p02712 | u685641906 | 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())\nfizz_buzz_sum = 0\nfor i in range(1, num + 1):\n if i % 3 != 0 or i % 5 != 0:\n fizz_buzz_sum += i\n\nprint(fizz_buzz_sum)', 'num = int(input())\nfizz_buzz_sum = 0\nfor i in range(1, num + 1):\n if i % 3 != 0 and i % 5 != 0:\n fizz_buzz_sum += i\n\nprint(fizz_buzz_sum)'] | ['Wrong Answer', 'Accepted'] | ['s928504725', 's961613588'] | [8972.0, 9096.0] | [156.0, 148.0] | [140, 141] |
p02712 | u686174642 | 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 f(i,j,k):\n if(i==1 or j==1 or k==1):\n \treturn 1\n l=[i,j,k] \n l.sort()\n i=l[0]\n j=l[1]\n k=l[2]\n if j%i !=0 or k%i !=0 or k%j !=0:\n return 1\n if (j%i ==0):\n if k%(j//i)==0:\n return j//i\n \n \n\nn=int(input())\nsum=0\nfor i in range(1,n):\n for j in range(1,n):\n for k in range(1,n):\n print(i," ",j," ",k, " ")\n sum+=f(i,j,k)\nprint(sum)\n ', 'n=int(input())\nsum=0\nfor i in range(1,n+1):\n if i%3!=0 and i%5 !=0:\n sum+=i\nprint(sum) '] | ['Wrong Answer', 'Accepted'] | ['s014062442', 's225113307'] | [31100.0, 9044.0] | [2265.0, 148.0] | [379, 94] |
p02712 | u686230543 | 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 = 1\nsum_ = 0\nwhile n:\n if i % 15 == 0:\n n -= 1\n elif i % 3 != 0 and i % 5 != 0:\n sum_ += i\n i += 1\nprint(sum_)', 'n = int(input())\nsum_ = 0\nfor i in range(1, n + 1):\n if i % 3 != 0 and i % 5 != 0:\n sum_ += i\nprint(sum_)'] | ['Wrong Answer', 'Accepted'] | ['s744143264', 's852546506'] | [9168.0, 9040.0] | [2205.0, 146.0] | [138, 109] |
p02712 | u690037900 | 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\ninput=sys.stdin.readline\nN = int(input())\nans = 0\nfor i in range(1,N+1):\n if i%3!=0 or i%5!=0:\n print(i)\nprint(ans)\n', 'import sys\ninput=sys.stdin.readline\nN = int(input())\nans = 0\nfor i in range(1,N+1):\n if i%3!=0 and i%5!=0:\n ans+=i\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s879330053', 's332225481'] | [9288.0, 9160.0] | [384.0, 156.0] | [137, 136] |
p02712 | u690442716 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['N = int(input())\ncount = 0\nfor i in range(N+1):\n if i % 3 != 0 and i % 5 != 0:\n print(i)\nprint(count)', 'N = int(input())\ncount = 0\nfor i in range(N+1):\n if i % 3 != 0 and i % 5 != 0:\n count += i\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s217546712', 's444386506'] | [8832.0, 9168.0] | [21.0, 146.0] | [103, 107] |
p02712 | u690536347 | 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 not (i%3==0 or i%5==0 or i%15==0):\n ans += i\nprint(i)', 'N = int(input())\nans = 0\nfor i in range(1, N+1):\n if not (i%3==0 or i%5==0 or i%15==0):\n ans += i\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s087154114', 's406816486'] | [9148.0, 9084.0] | [178.0, 175.0] | [110, 112] |
p02712 | u692498898 | 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=[]\nb=[]\nfor i in range(input()):\n if i%3!=0 and i%5!=0:\n a.append(i)\n else:\n b.append(i)\nprint(sum(a))', 'a=[]\nfor i in range(1,int(input())+1):\n if i%3!=0 and i%5!=0:\n a.append(i)\nprint(sum(a))'] | ['Runtime Error', 'Accepted'] | ['s206593443', 's287041820'] | [9044.0, 29832.0] | [19.0, 167.0] | [124, 98] |
p02712 | u692687119 | 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\nk15 = N // 15\nm = N - (15 * k15)\n\nk3 = m // 3\nk5 = m // 5\n\ndef sigma(n):\n ans = n * (n + 1) / 2\n return ans\n\nsum = (3 * sigma(k3)) + (5 * sigma(k5)) - (15 * sigma(k15))\n\nprint(sum)', 'N = int(input())\n\nk15 = N // 15\nm = N - (15 * k15)\n\nk3 = m // 3\nk5 = m // 5\n\ndef sigma(n):\n ans = (n * (n + 1)) / 2\n return ans\n\nsum = (3 * sigma((5 * k15) + k3)) + (5 * sigma((3 * k15) + k5)) - (15 * sigma(k15))\nan = sigma(N) - sum\nprint(int(an))'] | ['Wrong Answer', 'Accepted'] | ['s550492533', 's212257837'] | [9212.0, 9224.0] | [19.0, 20.0] | [200, 249] |
p02712 | u696469748 | 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())\noutput_list = []\n\nfor i in range(N):\n if i % 3 == 0 or i % 5 == 0 or i % 15 == 0:\n else:\n output_list.append(i)\n \nprint(sum(output_list)', 'N = int(input())\noutput_list = [0]\n\nfor i in range(1,N+1):\n if i % 3 == 0 or i % 5 == 0 or i % 15 == 0:\n pass\n else:\n output_list.append(i)\n \nprint(sum(output_list))'] | ['Runtime Error', 'Accepted'] | ['s730673533', 's975876406'] | [9020.0, 30016.0] | [22.0, 200.0] | [159, 174] |
p02712 | u699944218 | 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())\nln = [i for i in range(1,N+1)]\nfor i in range(N):\n if ln[i] % 3 == 0:\n nl.pop(i)\n elif ln[i] % 5 == 0:\n nl.pop(i)\n elif ln[i] % 15 == 0:\n nl.pop(i)\nprint(sum(nl))', 'N = int(input())\nln = [i for i in range(1,N+1)]\n\nfor i in range(N):\n if ln[i] % 3 == 0:\n ln[i] = 0\n elif ln[i] % 5 == 0:\n ln[i] = 0\n elif ln[i] % 15 == 0:\n ln[i] = 0\nprint(sum(ln))'] | ['Runtime Error', 'Accepted'] | ['s496116829', 's263514039'] | [48604.0, 48544.0] | [81.0, 281.0] | [191, 192] |
p02712 | u702582845 | 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=int(N)\na=1\n\nwhile a<N:\n\ta=a+1\n\nb=1\nwhile b<N//3:\n\tb=b+1\n\t\nc=1\nwhile c<N//5:\n\tc=c+1\n\t\nd=1\nwhile d<N//15:\n\td=d+1\n\t\n\nprint(a+d-b-c)', 'N=input()\nN=int(N)\n\na=1\nsum_a=0\nwhile a<=N:\n\tsum_a=sum_a+a\n\ta=a+1\n\nb=1\nsum_b=0\nwhile b<=N//3:\n\tsum_b=sum_b+b\n\tb=b+1\n\t\nc=1\nsum_c=0\nwhile c<=N//5:\n\tsum_c=sum_c+c\n\tc=c+1\n\t\nd=1\nsum_d=0\nwhile d<=N//15:\n\tsum_d=sum_d+d\n\td=d+1\n\t\n\nprint(sum_a+15*sum_d-3*sum_b-5*sum_c)'] | ['Wrong Answer', 'Accepted'] | ['s406434588', 's260237523'] | [9148.0, 9116.0] | [158.0, 239.0] | [140, 259] |
p02712 | u703391033 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\ncount = 0;\n \nfor i in range(n):\n if i % 3 != 0 and i % 5 != 0:\n count+=i\n \nprint(i)', 'n = int(input())\ncount = 0;\n\nfor i in range(n):\n if i % 3 != 0 && i % 5 != 0:\n count+=i\n \nprint(i)', 'n = int(input())\ncount = 0;\n \nfor i in range(n):\n if (i + 1) % 3 != 0 and (i + 1) % 5 != 0:\n count+=(i+1)\n \nprint(count)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s698371384', 's991960671', 's519098834'] | [9096.0, 8884.0, 9104.0] | [147.0, 21.0, 189.0] | [106, 104, 126] |
p02712 | u703442202 | 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())\nresult = 0\nfor i in range(1,n+1):\n if n % 3 != 0 and n % 5 != 0:\n result += i\n \nprint(result)', 'n = int(input())\nresult = 0\nfor i in range(1,n+1):\n if i % 3 ==0:\n continue\n elif i % 5 == 0:\n continue\n else:\n result += i\n \n \nprint(result)'] | ['Wrong Answer', 'Accepted'] | ['s299751080', 's331919836'] | [9168.0, 9168.0] | [187.0, 154.0] | [117, 159] |
p02712 | u704158845 | 2,000 | 1,048,576 | Let us define the **FizzBuzz sequence** a_1,a_2,... as follows: * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}. * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}. * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}. * If none of the above holds, a_i=i. Find the sum of all numbers among the first N terms of the FizzBuzz sequence. | ['n = int(input())\nsum = 0\nfor i in range(n):\n if i%5!=0 and i%3=0:\n sum = sum + 1\nprint(sum)', 'n = int(input())\nsum = 0\nfor i in range(1,n+1):\n if i%5!=0 and i%3!=0:\n sum = sum + i\nprint(sum)'] | ['Runtime Error', 'Accepted'] | ['s159042997', 's044022919'] | [9008.0, 9060.0] | [22.0, 161.0] | [101, 106] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.