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
p04047
u560988566
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\nl = [map(int, input().split())]\n\nans = 0\nl.sort()\n\nfor i in range(n):\n ans += l[2*i]\n\nprint(ans)', 'n = int(input())\nl = list(map(int, input().split()))\n\nans = 0\nl.sort()\n\nfor i in range(n):\n ans += l[2*i]\n \nprint(ans)']
['Runtime Error', 'Accepted']
['s484281013', 's892460810']
[2940.0, 2940.0]
[17.0, 17.0]
[116, 124]
p04047
u567493268
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['try:\n k=input()\nexcept EOFError:\n print("wtf")\n\ntry:\n li=input()\nexcept EOFError:\n print("wtf2")\n\n\nli.sort()\nsum=0\nfor k in range(len(li)):\n \n if k%2==0:\n \n sum=sum+li[k]\nprint(sum)', 'k = iinput()\nli= input().split()\nli.sort()\nsum=0\nfor k in range(len(li)):\n \n if k%2==0:\n \n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s131254454', 's389057621', 's509499974', 's616077020']
[9044.0, 8932.0, 8988.0, 8968.0]
[26.0, 27.0, 22.0, 26.0]
[192, 124, 115, 145]
p04047
u579875569
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['#!/usr/bin/python3\nimport sys\n\nsys.setrecursionlimit(100000)\n\nN, X = list(map(int, input().split()))\n\ndef f(a,b):\n if a > b:\n a,b = b,a\n if a==0 or b==0:\n return 0\n if b%a is 0:\n return int(a*(2*(b/a)-1))\n\n return int(2*a*int(b/a) + f(a,b%a))\n\nprint(N+f(N-X, X))\n', '...
['Runtime Error', 'Accepted']
['s078375409', 's855195465']
[3064.0, 3064.0]
[39.0, 40.0]
[296, 103]
p04047
u588633699
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nL = list(map(int, input().split()))\n\nL.sort()\nx = 0\n\nfor i in range(0, 2*N, 2):\n print(L[i])\n x += L[i]\n\nprint(x)\n\n', 'N = int(input())\nL = list(map(int, input().split()))\n \nL.sort()\nx = 0\n \nfor i in range(0, 2*N, 2):\n x += L[i]\n \nprint(x)']
['Wrong Answer', 'Accepted']
['s955651952', 's592727929']
[2940.0, 2940.0]
[17.0, 18.0]
[138, 123]
p04047
u612636296
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nL = list(map(int, input().split()))\nans = 0\nL.sort()\n\nfor i in range(0, 2 * N, 2):\n ans += L[i]\n print(i)\nelse:\n print(ans)', 'N = int(input())\nL = list(map(int, input().split()))\nans = 0\nL.sort()\n\nfor i in range(0, 2 * N, 2):\n ans += L[i]\nelse:\n print(ans)']
['Wrong Answer', 'Accepted']
['s521208011', 's226145692']
[3060.0, 3060.0]
[17.0, 18.0]
[149, 136]
p04047
u636014233
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nli = list(map(int, input().split))\nli.sort()\nP = 0\nfor i in range(N):\n P += li[i*2]\nprint(P)', 'N = int(input())\nli = list(map(int, input().split()))\nli.sort()\nP = 0\nfor i in range(N):\n P += li[i*2]\nprint(P)']
['Runtime Error', 'Accepted']
['s710307205', 's972505598']
[2940.0, 3064.0]
[17.0, 17.0]
[110, 112]
p04047
u651663683
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['input()\nprint(sum(list(map(int,input().split()))[0:-1:2] ))', 'input()\nprint(sum(list(sorted(list(map(int,input().split()))))[0:-1:2] ))\n']
['Wrong Answer', 'Accepted']
['s584401504', 's043044695']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 74]
p04047
u655048024
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nc=list(map(int, input().split()))\nc.sort()\nMax = 0\nfor i in range(N):\n K = 2*N\n Max = Max + c[K]\nprint(Max)\n ', 'N = int(input())\nL = list(map(int,input().split()))\nL.sort()\nmaximum = 0\nfor i in range(N):\n maximum += L[2*i]\nprint(maximum)']
['Runtime Error', 'Accepted']
['s956852856', 's925852761']
[2940.0, 2940.0]
[18.0, 17.0]
[129, 126]
p04047
u657413968
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['def main(p1,p2):\n print(p1)\n print(p2)\n L_np = np.sort(np.array(p2))\n x_total = 0\n for i in range(p1):\n x_total += L_np[2*i]\n print(x_total)\n\nif __name__ == "__main__":\n \n N = int(input())\n L = [int(item) for item in input().split()]\n main(N,L)', '# -*- coding: utf-8 ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s297588072', 's439795445', 's181591179']
[3060.0, 12516.0, 13212.0]
[18.0, 149.0, 163.0]
[318, 363, 335]
p04047
u671395265
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\nprint(sum(sorted(map(int, input()))[::2]))', 'n = int(input())\nprint(sum(sorted(list(map(int, input().split())))[::2]))']
['Runtime Error', 'Accepted']
['s830242700', 's544358960']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 73]
p04047
u673338219
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\nl = list(map(int,input().split()))\nl.sort(reverse=True)\nprint(sum(l[0::2]))', 'n = int(input())\nl = list(map(int,input().split()))\nl.sort(reverse=True)\nprint(sum(l[1::2]))']
['Wrong Answer', 'Accepted']
['s370139345', 's334766368']
[9112.0, 9108.0]
[30.0, 32.0]
[92, 92]
p04047
u684695949
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['def f(a,b):\n\tif a==b:\n\t\treturn 2*a\n\telif a < b:\n\t\treturn 2*a* + f(a,b-a)\n\telse:\n\t\treturn 2*b + f(a-b,b)\n\n\nN,X = map(int,input().split(" "))\n\nprint(N+f(N-X,X))', 'import bisect\n\nN = input()\nLs = map(int,input().split(" "))\nLs = sorted(Ls)\nans = sum([L for i,L in enumerate(Ls) if i%2 == 0])\npr...
['Runtime Error', 'Accepted']
['s184275577', 's356094197']
[2940.0, 3060.0]
[17.0, 17.0]
[158, 138]
p04047
u688126754
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\ntmp_lst = input().split()\nlength_lst = []\nprint(2*N)\nfor i in range(2*N):\n print(tmp_lst[i])\n length_lst.append(int(tmp_lst[i]))\nlength_lst.sort()\n\noutput = 0\nfor i in range(0, 2*N, 2):\n output += length_lst[i]\n\nprint(output)\n', 'N = int(input())\ntmp_lst = input().split()\nlen...
['Wrong Answer', 'Accepted']
['s263934574', 's394870315']
[3060.0, 3060.0]
[19.0, 17.0]
[252, 255]
p04047
u740284863
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['from fractionsimport gcd\nn,x=map(int,input().split())\nprint(3*(n-gcd(n,x)))\n', 'N = int(input())\nL = sorted(list(map(int,input().split())))\n\nsum = 0\nfor i in range(0,2*N,2):\n sum += L[i]\nprint(sum)\n']
['Runtime Error', 'Accepted']
['s605778442', 's171679355']
[2940.0, 2940.0]
[18.0, 18.0]
[76, 121]
p04047
u747873993
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['"""A - BBQ Easy"""\nimport numpy as np\nN=int(input())\nL=[int(i) for i in input().split()]\nresult=0\nfor i in range(0,N,2):\n result+=np.sort(L)[i]\nprint(result)\n\n', 'import numpy as np\nN=int(input())\nL=[int(i) for i in input().split()]\nresult=0\nfor i in range(0,len(L),2):\n result+=np.sort(L)[i]\nprin...
['Wrong Answer', 'Accepted']
['s819785151', 's359409798']
[12496.0, 12496.0]
[150.0, 149.0]
[162, 146]
p04047
u749416810
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n=int(input())\nl=list(map(int, input().split()))\ns=0\nfor i in range(0,2*n, 2):\n s+=min(l[i], l[i+1]) \nprint(s) ', 'n=int(input())\nl=list(map(int,input().split()))\nl.sort()\ns=0\nfor i in range(0,2*n,2):\n s+=min(l[i],l[i+1])\nprint(s)']
['Wrong Answer', 'Accepted']
['s621640463', 's785931268']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 116]
p04047
u753871011
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['a = int(input())\nb = input()\n\nb = b.split()\nb = [int(x) for x in b]\n\nb = sorted(b)\nb = b[::-1]\nprint(b)\n\ndef get(a,x):\n\tif a == 0:\n\t\treturn 0\n\tx.pop(0)\n\tadd = x.pop(0)\n\n\treturn add + get((a-1),x)\n\nprint(get(a,b))', 'a = int(input())\nb = input()\n\nb = b.split()\nb = [int(x) for x in b]\n\nb =...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s040338837', 's622157013', 's351232295']
[3064.0, 3064.0, 3188.0]
[39.0, 37.0, 41.0]
[212, 217, 208]
p04047
u762420987
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nLlist = sorted(list(map(int, input().split())))[::-1]\nans = 0\nfor i in range(0, 2*N):\n ans += min(Llist[i], Llist[i+1])\nprint(ans)\n', 'N = int(input())\nLlist = sorted(list(map(int, input().split())))[::-1]\nans = 0\nfor i in range(0, 2*N, 2):\n ans += min(Llist[i], Llist[i+1])\nprint(ans...
['Runtime Error', 'Accepted']
['s806014864', 's931877360']
[2940.0, 2940.0]
[18.0, 17.0]
[151, 154]
p04047
u807772568
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['a = int(input())\n\nb = list(map(int,input().split()))\n\nb.sorted()\n\nsu = 0\n\nfor i in range(a-1):\n su += b[2*i]', 'a = int(input())\n\nb = list(map(int,input().split()))\n\nb.sorted()\n\nsu = 0\n\nfor i in range(a):\n su += b[2*i]', 'a = int(input())\n\nb = list(map(int,input().split()))\n\nb.sort()\n\nsu = 0...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s331366516', 's571583433', 's785468595', 's081524959']
[2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 19.0]
[109, 107, 117, 115]
p04047
u824237520
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(n)\na = list(map(int, input().split()))\n\na.sort()\n\nans = 0\nfor i in range(n):\n ans += a[i*2]\n\nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\n\na.sort()\n\nans = 0\nfor i in range(n):\n ans += a[i*2]\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s635655531', 's722742810']
[2940.0, 2940.0]
[17.0, 17.0]
[114, 120]
p04047
u828766688
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nL = list(map(int,input().split()))\nL.sort()\n\nans = 0\nfor i in range(N):\n if i % 2 == 0:\n ans += L[i]\nprint (ans)', 'N = int(input())\nL = list(map(int,input().split()))\nL.sort()\n\nans = 0\nfor i in range(2*N):\n if i % 2 == 0:\n ans += L[i]\nprint (ans)']
['Wrong Answer', 'Accepted']
['s304754181', 's348777016']
[3060.0, 2940.0]
[17.0, 17.0]
[133, 135]
p04047
u844902298
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\ns = list(map(int,input().split()))\ns.sort()\nsum = 0\n\nfor i in range(0,2n,2):\n sum += s[i]\nprint(sum)', 'n = int(input())\ns = list(map(int,input().split()))\ns.sort()\nsum = 0\n\nfor i in range(0,2*n,2):\n sum += s[i]\nprint(sum)']
['Runtime Error', 'Accepted']
['s320410504', 's297358608']
[2940.0, 3060.0]
[17.0, 17.0]
[118, 119]
p04047
u845333844
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n=int(input())\nl=list(map(int,input().split()))\n \nl.sort()\nk=l[::2]\nsum=0\nfor i in range(n-2):\n sum += k[i]\n \nprint(sum)', 'n=int(input())\nl=list(map(int,input().split()))\n\nl.sort()\nk=l[::2]\n\nprint(k.sum())', 'n=int(input())\nl=list(map(int,input().split()))\n \nl.sort()\nk=l[::2]\nsum=0\nfor i in ra...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s468395888', 's928614242', 's533053760']
[2940.0, 2940.0, 2940.0]
[24.0, 19.0, 17.0]
[122, 82, 120]
p04047
u853900545
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\nl = sorted(list(map(int,input().split())))\n\nc = 0\nfor i in range(n):\n c +=l[i]\n print(c)', 'n = int(input())\nl = sorted(list(map(int,input().split())))\n\nc = 0\nfor i in range(n//2):\n c +=l[i]\n print(c)', 'n = int(input())\nl = sorted(list(map(int,input().split())))\n\nc = 0\nfo...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s257673174', 's428582721', 's871525832', 's774166090']
[3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 17.0]
[111, 114, 107, 110]
p04047
u856671164
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['\nnum = int(input())\nli = int(input().split())\n\nprint(num)\nprint(li)', 'n = int(input())\nli = [int(x) for x in input().split()]\n\ndef skews(n,li):\n \n li = sorted(li)\n li = [l for i,l in enumerate(li) if i%2==0] \n return sum(li)\n\n\nprint(skews(n,li))\n']
['Runtime Error', 'Accepted']
['s838662080', 's028090472']
[9092.0, 8880.0]
[25.0, 28.0]
[67, 188]
p04047
u859897687
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n=int(input())\nl=list(map(int,input().split()))\nl.sort(reverse=1)\nans=0\nfor i in range(1,n,2):\n ans+=l[i]\nprint(ans)', 'n=int(input())\nl=list(map(int,input().split()))\nl.sort(reverse=1)\nans=0\nfor i in range(n):\n ans+=l[2*i+1]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s924068200', 's251954815']
[2940.0, 2940.0]
[17.0, 18.0]
[117, 117]
p04047
u860843282
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['from collections import Counter\n \nn = int(input())\n \narr = list(map(int, input().split()))\n \ncounts = Counter(arr)\n \nres = 0\n \nfor k,v in counts.items():\n if v>=2:\n res += v//2\n counts[k] = v%2\n \nitems = sorted(counts.items())\nfor i in range(len(items)-1):\n res+=min(items[i], items[i+1])\n...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s112597968', 's280396540', 's654705910', 's784455302', 's888016571']
[9388.0, 9112.0, 9156.0, 9176.0, 8968.0]
[24.0, 26.0, 28.0, 28.0, 25.0]
[313, 308, 144, 149, 156]
p04047
u864276028
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['N = int(input())\nL = list(map(int, input().split()))\nL.sort()\nS = 0\nfor i in range (0, 2*N+1, 2):\n S += L[i]\nprint(S)', 'N = int(input())\nL = list(map(int, input().split()))\nL.sort()\nS = 0\nfor i in range (1, 2*N+1, 2):\n S += L[i-1]\nprint(S)']
['Runtime Error', 'Accepted']
['s420396881', 's036877571']
[9140.0, 9036.0]
[24.0, 29.0]
[118, 120]
p04047
u867736259
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['a = int(input())\nb = list(map(int,input().split()))\nb = sorted(b)\nc = 0\nfor i in range(0,a,2):\n c += b[i]\nprint(c)', 'a = int(input())\nb = list(map(int,input().split()))\nb = sorted(b)\nc = 0\nfor i in range(0,2*a,2):\n c += b[i]\nprint(c)']
['Wrong Answer', 'Accepted']
['s391633563', 's427633441']
[2940.0, 2940.0]
[17.0, 17.0]
[117, 119]
p04047
u891482208
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['a = sorted(list(map(int, input().split())))\nans = 0\nfor i in range(0, len(a), 2):\n ans += a[i]\nprint(ans)', 'n = input()\na = sorted(list(map(int, input().split())))\nans = 0\nfor i in range(0, len(a), 2):\n ans += a[i]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s555645132', 's004636450']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 118]
p04047
u904804404
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['def tri_len(x,y):\n if x== y:\n return x\n elif x < y:\n return tri_len(y-x,x)+2*x\n else:\n return tri_len(x-y,y)+2*y\nimport sys\nsys.setrecursionlimit(10000)\n\nn,x= list(map(int,input().split(" ")))\n\nprint( n+tri_len(x,n-x))', 'a = input()\nlst = input().split(" ")\nlst.sort()\nans=0\nfor i in range...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s396854922', 's559310751', 's631135163', 's642493992']
[3064.0, 2940.0, 3060.0, 2940.0]
[17.0, 17.0, 18.0, 18.0]
[230, 125, 231, 143]
p04047
u906129425
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(a[::2])', 'n = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(sum(a[::2]))']
['Wrong Answer', 'Accepted']
['s182284261', 's921951726']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 80]
p04047
u914627967
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['ans=0\nN=int(input())\nkushi=[]\nfor s in range(N):\n\tkushi.append(input())\nfor s in range(N):\n\tkushi1="".join(kushi[s]).rstrip("\\n").split(" ")\n\tfor j in range(N-s):\n\n\t\tif j==0:\tcontinue\n\t\tkushi2="".join(kushi[s+j]).rstrip("\\n").split(" ")\n\t\tn=int(kushi1[0])+int(kushi2[0])+int(kushi1[1])+int(kushi...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s080016681', 's457272852', 's488508931']
[3316.0, 3064.0, 3188.0]
[39.0, 39.0, 39.0]
[407, 408, 207]
p04047
u933750963
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['x,y=map(int,input().split())\nz=3.5*y+x\nprint(z)', 'x,y=map(int,input().split())\nz=3.5*y+x\nprint(z)', 'x=input()\ny = sorted(list(map(int, input().split())))\ni=1\nz=0\nfor i in range(int(len(y)/2)):\n z+=y[-2*i]\n i+=1\n\nprint(z)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s569317134', 's679727884', 's378750090']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[47, 47, 129]
p04047
u936985471
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n=int(input())\nL=sorted(list(map(int,input().split())))\nans=0\nfor i in range(0,n,2):\n ans+=L[i]\nprint(ans)\n', 'n=int(input())\nL=sorted(list(map(int,input().split())))\nans=0\nfor i in range(0,n*2,2):\n ans+=L[i]\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s222302546', 's731496909']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 110]
p04047
u966695411
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['#! /usr/bin/env python3\n\nN, X = map(int, input().split())\nif X*2 == N:\n print(X*3)\nelse:\n print(X*3*((N-X)//X + (1 if (N-X)%X>0 else 0)))', '#! /usr/bin/env python3\n\nN = int(input())\nL = list(sorted(map(int, input().split())))\nans = 0\nfor i in range(N):\n ans += min(L[i*2], L[i*2+1])\nprint(ans)']
['Runtime Error', 'Accepted']
['s948258491', 's165977389']
[3064.0, 7524.0]
[46.0, 1434.0]
[143, 156]
p04047
u971161994
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['import random\n\nN = int(input())\nL =[]\nfor i in range(N*2):\n guzai=random.randint(1,100)\n L.append(guzai)\n\nL.sort()\n\nprint(L)\n#print(L)\nL_even=L[0::2]\n\ngoukei=sum(L_even)\nprint(str(goukei))\n', 'import random\n\nN = int(input())\nL =[]\nfor i in range(N*2):\n guzai=random.randint(1,100)\n L....
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s166759911', 's177554736', 's221093562', 's408768866', 's564078703', 's887228719', 's813502878']
[4336.0, 3316.0, 2940.0, 4208.0, 2940.0, 3824.0, 2940.0]
[36.0, 21.0, 17.0, 33.0, 17.0, 28.0, 17.0]
[195, 173, 122, 185, 149, 228, 138]
p04047
u993493158
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n = int(input())\nL = list(map(int, input().split())\nL.sort()\narray_L = []\nfor m in [i * 2 for i in range(n)]:\n array_L.append(L[m])\nprint(sum(array_L))\n ', 'n = int(input())\nL = list(map(int, input().split()))\nL.sort()\narray_L = []\nfor m in [i * 2 for i in range(n)]:\n array_L.append(L[m])\nprint(...
['Runtime Error', 'Accepted']
['s220467221', 's081595892']
[2940.0, 2940.0]
[19.0, 24.0]
[159, 161]
p04047
u994988729
2,000
262,144
Snuke is having a barbeque party. At the party, he will make N servings of _Skewer Meal_. Example of a serving of Skewer Meal He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients. To make a serving of Skewer Me...
['n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nans=sum(l[1::2])\nprint(ans)', 'n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nans = sum(l[0::2])\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s180739735', 's945202053']
[2940.0, 2940.0]
[17.0, 17.0]
[84, 92]
p04048
u077337864
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['def gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a%b)\n\nn, x = map(int, input().split())\nprint(3*gcd(n, x))', 'def gcd(a, b):\n if b == 0:\n return a\n else:\n return gcd(b, a%b)\n\nn, x = map(int, input().split())\nprint(3*(n - gcd(n, x)))\n']
['Wrong Answer', 'Accepted']
['s136913283', 's338757392']
[3060.0, 3060.0]
[18.0, 17.0]
[124, 131]
p04048
u098968285
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
["N, X = map(int, input().split())\nY = N - X\n\nif 2 * X == N:\n\tprint(X*3)\nelif 2 * X < N:\n\tans = Y + 3 * X\n\ta = N-2*X\n\tb = X\n\t\n\tif a < b:\n\t\tans += ((X // a) * 2 - 1) * a\n\telse:\n\t\tans += ((X // b) * 2 - 1) * b\n\traise NameError('NG!')\n\tprint(ans)\nelse: # 2 * X < N\n\tans = X\n\tans += ((X // ...
['Wrong Answer', 'Accepted']
['s461206336', 's457453370']
[3064.0, 3064.0]
[38.0, 39.0]
[332, 268]
p04048
u211706121
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['n,x = [int(i) for i in input().split()]\nlength = n\nn=n-x\nwhile True:\n if x==0:\n break\n t=n//x\n length+=2*t*x\n a=n\n n=x\n x=a-t*x\nprint(length)', 'n,x = [int(i) for i in input().split()]\n\nlength = n\nn=n-x\nwhile True:\n if x==0:\n length-=x\n break\n t=n//x\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s506811118', 's715345696', 's584383797']
[3060.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0]
[166, 185, 185]
p04048
u305052967
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['N,X = map(int, input().split())\nprint(N)\nprint(X)\n\ndef para(a,b):\n if a > b:\n return 2*b + para(b,a-b)\n if a < b:\n return 2*a + para(b-a,a)\n if a == b:\n return a\nprint(N+para(X,N-X))', 'N,X = map(int, input().split())\nprint(N)\nprint(X)\n\ndef para(a,b):\n if a > b:\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s248720864', 's296000499', 's388156638', 's803960281', 's362373879']
[3980.0, 3988.0, 3060.0, 3064.0, 3316.0]
[74.0, 75.0, 17.0, 18.0, 21.0]
[212, 214, 291, 295, 125]
p04048
u332049206
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['N,X = map(int,input().split())\nx = X\ny = N-X\nif x<y:\n x,y = y,x\nres = N\nwhile y>0:\n x,y = y,x\n print(x,y)\n m = x*(y//x)\n res += m*2\n y -= m\nres -= x\nprint(res)', 'N,X = map(int,input().split())\nx = X\ny = N-X\nif x<y:\n x,y = y,x\nres = N\nwhile y>0:\n x,y = y,x\n m = x*(y//x)...
['Wrong Answer', 'Accepted']
['s733403426', 's805954247']
[3064.0, 3188.0]
[17.0, 18.0]
[177, 162]
p04048
u334712262
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
["# -*- coding: utf-8 -*-\nimport bisect\nimport heapq\nimport math\nimport random\nimport sys\nfrom collections import Counter, defaultdict, deque\nfrom decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal\nfrom functools import lru_cache, reduce\nfrom itertools import combinations, combinations_with_replacement, prod...
['Runtime Error', 'Accepted']
['s048338925', 's010118889']
[5688.0, 5448.0]
[42.0, 38.0]
[1458, 1496]
p04048
u477320129
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import sys\nsys.setrecursionlimit(1500)\n\ndef f(x, y):\n if y == 0:\n return 0\n if x == y:\n return x\n x, y = min(x, y), max(x, y)\n return 2 * (y // x) * x + f(x, y % x)\n\nN, X = list(map(int, input().split()))\nprint(f(X, N-X) + N)\n', 'import sys\nsys.setrecursionlimit(1500)\n\ndef f(...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s152411645', 's191680008', 's604465468', 's976467494']
[3064.0, 3116.0, 3064.0, 3064.0]
[42.0, 46.0, 42.0, 39.0]
[252, 220, 220, 243]
p04048
u525796732
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
["def main():\n n,x=map(int,input().split())\n a,b=n-x,x\n if(a<b):\n a,b=b,a\n path_length = calc_path(a,b,n)\n print(path_length)\n\ndef calc_path(a1,b1,c1):\n q , mod=divmod(a1,b1)\n count=0\n if mod==0:\n print(c1)\n c2=c1+2*b1*q-b1\n print(c2)\n return...
['Wrong Answer', 'Accepted']
['s573674066', 's037011222']
[3064.0, 3064.0]
[18.0, 20.0]
[504, 466]
p04048
u562016607
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['def gcd(a,b):\n if a%b==0:\n return b\n else:\n return gcd(b,a%b)\nN,X=map(int,input().split())\nprint(3*(N-gcd(N,X))\n', 'def gcd(a,b):\n if a%b==0:\n return b\n else:\n return gcd(b,a%b):\nN,X=map(int,input().split())\nprint(3*(N-gcd(N,X))', 'def gcd(a,b):\n if a%b==0:\n return b\n else:\n r...
['Runtime Error', 'Runtime Error', 'Accepted']
['s002545282', 's352506225', 's230428310']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[120, 120, 121]
p04048
u631277801
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import sys\nstdin = sys.stdin\n \nsys.setrecursionlimit(10**8) \n \ndef li(): return map(int, stdin.readline().split())\ndef li_(): return map(lambda x: int(x)-1, stdin.readline().split())\ndef lf(): return map(float, stdin.readline().split())\ndef ls(): return stdin.readline().split()\ndef ns(): return stdin.readlin...
['Wrong Answer', 'Accepted']
['s036340270', 's194143299']
[3064.0, 3064.0]
[18.0, 18.0]
[767, 777]
p04048
u638357064
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['from math import floor\nN, X = [int(x) for x in input().split()]\n\nprint(N, X)\n\nx0 = N\nx1 = X\nx2 = x0-x1\nL = 2*X\nc = 1\nwhile x2 > 0:\n\tk = floor(x0/(x1/2))-1\n\tL += x1*k\n\tx0, x1, x2 = (x1, x2, x0-x1)\n\nprint(L)', '# your code goes here\nfrom math import floor\nN, X = [int(x) for x in input().split()]\n\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s178776627', 's779272697', 's038072391']
[3060.0, 3060.0, 3060.0]
[19.0, 17.0, 17.0]
[205, 248, 250]
p04048
u684695949
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['def f(a,b):\n\treturn 2*a + f_fast(a,b-a)\n\n\n\ndef f_fast(a,b):\n\tif a==b:\n\t\treturn a+b\n\telif a < b:\n\t\tif b%a == 0:\n\t\t\treturn f(a,b)\n\t\telse:\n\t\t\td = b//a\n\t\t\treturn 2*a*d + f_fast(a,b%a)\n\telse:\n\t\treturn f_fast(b,a)\n\n\nN,X = map(int,input().split(" "))\n\nprint(N+f_fast(N-X,X))', 'def f(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s527203596', 's744545686', 's861657137', 's217425975']
[3940.0, 3976.0, 4212.0, 3064.0]
[78.0, 72.0, 74.0, 17.0]
[267, 157, 169, 303]
p04048
u690536347
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import sys\nsys.setrecursionlimit(10**15)\n\ndef f(a,b):\n if a==b:return a\n if not a<b:a,b=b,a\n return f(a,b-a)+2*a\n\nN,X=map(int,input().split())\nprint(f(X,N-X)+N)\n', 'import sys\nsys.setrecursionlimit(10**7)\n\ndef f(a,b):\n if a==b:return a\n if not a<b:a,b=b,a\n return 2*(b//a)*a+f(a,b%a) ...
['Runtime Error', 'Accepted']
['s891845339', 's825981109']
[2940.0, 3060.0]
[18.0, 18.0]
[170, 200]
p04048
u697658632
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import math\nn, x = map(int, input().split())\nprint(3 * (n - gcd(n, x)))\n', 'import math\nn, x = map(int, input().split())\nprint(3 * (n - math.gcd(n, x)))\n']
['Runtime Error', 'Accepted']
['s297220978', 's109261748']
[9116.0, 9064.0]
[23.0, 27.0]
[72, 77]
p04048
u745087332
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['n, x = map(int, input().split())\n\ndef func(a, b):\n if a < b:\n if b%a == 0:\n return b/a*2 - 1\n else:\n return 2*a + func(a, b-a)\n else:\n if a%b == 0:\n return a/b*2 - 1\n else:\n return 2*b + func(a-b, b)\n \nif x == n/2:\...
['Runtime Error', 'Accepted']
['s836690284', 's994394061']
[3952.0, 3188.0]
[74.0, 20.0]
[355, 592]
p04048
u787059958
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['n, x = map(int, input().split())\na, b = max(n-x,x),min(n-x,x)\nres = a+b\nwhile b!=0:\n q = a/b\n r = a%b\n res += (b*2)*q\n if (r==0):\n res -= b\n a, b = b, r\n\nprint(res)', 'n, x = map(int, input().split())\nans = 0\na, b = max(n-x,x),min(n-x,x)\nres = a+b\nwhile b:\n q = a/b\n r = a%...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s097379139', 's548884385', 's504779492']
[3060.0, 3188.0, 3188.0]
[18.0, 21.0, 19.0]
[186, 191, 187]
p04048
u820560680
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['N, X = map(int, input().split())\npath = N\na, b = X, N - X\nif a < b:\n a, b = b, a\nwhile b > 0:\n print(a, b)\n path += b * (a // b) * 2\n a, b = b, a % b\npath -= a\nprint(path)', 'N, X = map(int, input().split())\npath = N\na, b = X, N - X\nif a < b:\n a, b = b, a\nwhile b > 0:\n path += b * (a...
['Wrong Answer', 'Accepted']
['s908573544', 's106788899']
[3060.0, 3060.0]
[17.0, 17.0]
[183, 167]
p04048
u856671164
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['N,X = input().split()\nN,X = int(N), int(X)\nanswer = X+ (N-X)\n\n\ndef rhombus(N,X):\n \tif N<X:\n temp = N\n N = X\n X = temp \n \n if X==1: \n return N+1\n if X==0:\n return 0\n\n if N%X == 0:\n return X*(N//X)*2-X\n \n else: \n k = N//X\n ...
['Runtime Error', 'Accepted']
['s311100241', 's323769427']
[8880.0, 9140.0]
[25.0, 28.0]
[391, 328]
p04048
u874303957
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['N, X = input().split()\n\nprint(3 * int(N))', 'N, X = map(int, input().split())\nq, p = sorted((N - X, X))\n\nr = 1\nwhile r:\n p, r = divmod(p, q)\n N += (2 * p - (r == 0)) * q\n p, q = q, r\n\nprint(N)']
['Wrong Answer', 'Accepted']
['s475209552', 's860314589']
[2940.0, 2940.0]
[17.0, 17.0]
[41, 156]
p04048
u879870653
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import sys\nsys.setrecursionlimit(10**12+1)\n\nN,X = map(int,input().split())\n\ndef f(a,b) :\n if a < b :\n return 2*a + f(a,b-a)\n elif a > b :\n a,b = b,a\n return 2*a + f(a,b-a)\n else :\n return a\n\nans = N + f(X,N-X)\n\nprint(ans)\n', 'N,X = map(int,input().split())\n\ndef ...
['Runtime Error', 'Accepted']
['s883872348', 's783693060']
[2940.0, 3060.0]
[18.0, 18.0]
[259, 218]
p04048
u902468164
2,000
262,144
Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of _Mysterious Light_. Three mirrors of length N are set so that they form an equilateral triangle. Let the vertices of the triangle be a, b and c. Inside the triangle, the rifle is placed at the point p on segment ab such that a...
['import fraction\n\nli = [int(i) for i in input().split(" ")]\nres = (li[0] // fraction.gcd(li[0], li[1]) -1) * 3 * fraction.gcd(li[0], li[1])\nprint(res)', 'def gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\nli = [int(i) for i in input().split(" ")]\nres = (li[0] // gcd(li[0], li[1]) -1) * 3 * gcd(li[0], ...
['Runtime Error', 'Accepted']
['s936674618', 's156822289']
[2940.0, 3060.0]
[18.0, 19.0]
[149, 168]
p04050
u227082700
2,000
262,144
Snuke got a present from his mother on his birthday. The present was a pair of two sequences a and b, consisting of positive integers. They satisfied all of the following properties: * The sum of all elements of a is N. * The sum of all elements of b is N. * Any string of length N that satisfies the following tw...
['n,m=map(int,input().split())\na=list(map(int,input().split()))\nb=[]\no=[]\nfor i in a:\n if i%2:o.append(i)\n else:b.append(i)\nif len(o)>2:print("Impossible");exit()\nif len(o)==1:b=o+b\nelif len(o)==2:b=[o[0]]+b+[o[1]]\nans=[]\nfor i in range(len(b)):\n if i==0:ans.append(b[i]-1)\n elif i==len(b)-1:ans.append(...
['Wrong Answer', 'Accepted']
['s498481701', 's571339864']
[3064.0, 3064.0]
[18.0, 18.0]
[464, 464]
p04051
u102461423
2,000
262,144
Snuke is having another barbeque party. This time, he will make one serving of _Skewer Meal_. He has a stock of N _Skewer Meal Packs_. The i-th Skewer Meal Pack contains one skewer, A_i pieces of beef and B_i pieces of green pepper. All skewers in these packs are different and distinguishable, while all pieces of bee...
['import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nimport numpy as np\n\nMOD = 10 ** 9 + 7\n\nN = int(readline())\nm = map(int,read().split())\nAB = zip(m,m)\n\nD = 2000\n\ndef cumprod(arr,MOD):\n L = len(arr); Lsq = int(L**.5+1)\n arr = np....
['Runtime Error', 'Accepted']
['s389585547', 's283438001']
[40124.0, 40384.0]
[451.0, 761.0]
[1223, 794]