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
p02754
u877428733
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B = map(int,input().split())\n\nb = 0\nr = 0\n\nif A >= N:\n print(A)\nelif A == 0 and B == 0:\n print(0)\nelse:\n C = A * (N // (A+B) )\n D = N % (A+B) \n print(D)\n if D <= A:\n print(C+D)\n else:\n print(C+A)', 'N,A,B = map(int,input().split())\n\nb = 0\nr = 0\n\nif A >= N:\n...
['Wrong Answer', 'Accepted']
['s960971210', 's760520137']
[3064.0, 2940.0]
[18.0, 17.0]
[234, 186]
p02754
u878545651
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, a, b = map(int, input().split())\nperiod = a+b\ntimes = n//period\nk = n%period\nn = a if k >a else k\nprint(times*a + n)\n---------------------------\na, b = [int(x) for x in input().split()]\n \nif (b < a):\n temp = b\n b = a\n a = temp', 'n, a, b = map(int, input().split())\nperiod = a+b\ntimes = n//p...
['Runtime Error', 'Accepted']
['s744780610', 's295670351']
[2940.0, 2940.0]
[17.0, 18.0]
[239, 120]
p02754
u879248892
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['a,b=map(int,input().split())\nr=-1\nfor i in range(1001):\n if i*8//100==a and i*10//100==b:\n r=i\n break\nprint(r)', 'n,a,b=map(int,input().split())\nans = n//(a+b)*a + min(n%(a+b),a)\nprint(ans)']
['Runtime Error', 'Accepted']
['s006877681', 's192643312']
[2940.0, 3064.0]
[17.0, 18.0]
[127, 75]
p02754
u880480312
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B=map(int,input().split())\na=[]\nwhile len(a) < N:\n for i in range(A):\n a.append("x")\n for j in range(B):\n a.append("y")\n break\nans=a[:N]\nprint(ans.count("x"))\n\n\n', 'N,A,B=map(int,input().split())\na=[]\nfor i in range(A):\n a.append("x")\nfor j in range(B):\n a.append(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s129376781', 's405046238', 's208054133']
[199320.0, 195224.0, 2940.0]
[2116.0, 2113.0, 18.0]
[192, 204, 67]
p02754
u887207211
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["import sys\n\nstdin = sys.stdin\n\nns = lambda : stdin.readline().rstrip()\nni = lambda : int(ns())\nna = lambda : list(map(int, stdin.readline().split()))\nsys.setrecursionlimit(10 ** 7)\n\ndef main():\n n, a, b = na()\n \n if a == 0 and b == 0 || a == 0:\n print(0)\n return\n\n if n <= a:\...
['Runtime Error', 'Accepted']
['s382224197', 's112234866']
[2940.0, 3064.0]
[17.0, 18.0]
[509, 520]
p02754
u890233117
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, a, b = map(int,input().split())\ntot = a + b\nbcnt = (n // tot) * b\nn -= (n // tot) * tot\nbcnt += min(n,b)\nprint(bcnt)\n', 'n, a, b = map(int,input().split())\ntot = a + b\nbcnt = (n // tot) * a\nn -= (n // tot) * tot\nbcnt += min(n,a)\nprint(bcnt)\n']
['Wrong Answer', 'Accepted']
['s619682061', 's265089130']
[2940.0, 2940.0]
[18.0, 18.0]
[120, 120]
p02754
u891422384
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["n, a, b = map(int, input().split(' '))\nprint(int(min(n-n//(a+b),a))+int((n//(a+b))*a))", "n, a, b = map(int, input().split(' '))\nprint(min(int(n%(a+b)),a)+int((n//(a+b)1)*a))", "n, a, b = map(int, input().split(' '))\nprint(min(int(n%(a+b)),a)+int((n//(a+b))*a))"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s451771775', 's454681360', 's649783917']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[86, 84, 83]
p02754
u901598613
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b=map(int,input().split())\ns=a+b\nif n%s==0:\n print(int(n/s)*a)\nelse:\n if n%s>=a:\n print(int(n//s+1)*a)\n else:\n print(int(n//s+)*a+n%s)', 'n,a,b=map(int,input().split())\ns=a+b\nif n%s==0:\n print(int(n/s)*a)\nelse:\n if n%s>=a:\n print(int(n//s+1)*a)\n else:\n ...
['Runtime Error', 'Accepted']
['s937639772', 's413837150']
[8976.0, 9176.0]
[24.0, 30.0]
[161, 160]
p02754
u901757711
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b = map(int, input().split())\n\nt = []\n\nif n < (a+b):\n print(a)\nelse:\n if n % (a+b) > 0:\n print(n//(a+b)*a+a)\n else:\n print(n//(a+b)*a)\n', 'n,a,b = map(int, input().split())\n\nt = []\ni = 0\nif n <= a+b:\n print(a)\nelse:\n while len(t) > n:\n t = "b"*a +"r"*b\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s190764381', 's627270912', 's176100398']
[3316.0, 3060.0, 3064.0]
[21.0, 17.0, 17.0]
[162, 179, 203]
p02754
u907446975
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
[' n,a,b=map(int,input().split())\n answer=n//(a+b)*a+min(n%(a+b),a)\n print(answer)', 'a = input().split()\na = list(map(int,a))\n(n,m,k)=a\nanswer = n // (m + k) * m + min(n % (m + k), m)\nprint(answer)\n']
['Runtime Error', 'Accepted']
['s939767838', 's763910112']
[2940.0, 2940.0]
[17.0, 17.0]
[89, 113]
p02754
u911567364
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B=input().split()\nN=int(N)\nA=int(A)\nB=int(B)\nC=A+B\nif (0<C<=10**18)and(0<N<=10**18)and(A>=0)and(B>=0):\n queue=("a"*A+"b"*B)*(10**18)\n number=queue.count("a",0,N)\n print(number)', 'N,A,B=map(int,input().split())\nC=A+B\nif (0<C<=10**18)and(0<N<=10**18)and(A>=0)and(B>=0):\n queue=("a"*A+"b"*B)*(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s182311032', 's459961646', 's360533038']
[3060.0, 3060.0, 3060.0]
[19.0, 18.0, 17.0]
[189, 172, 203]
p02754
u916259207
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, a b = map(int, input().split())\nans = n// (a + b)\nrem = n % (a + b)\nans += min(rem, A)\nprnit(ans)', 'n , a, b = map(int, input().split())\nans = n//(a + b) * a\nrem = n % (a + b)\nans += min(rem, a)\nprint(ans)']
['Runtime Error', 'Accepted']
['s734392926', 's006711198']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 105]
p02754
u917444023
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["N,A,B=map(int,input().split())\nr=1\nS=set()\nwhile r<= 10**100:\n\tS='b'*A + str(S) +'r'*B\n\tif len(S)>10**18:\n\t\tS = S[1,10**18]\n\tr=r+1\nprint(S[1,N],count('b'))", "N,A,B =int(input())\nr = 1\nS=string()\nwhile r<=10**100:\n\tS='b'*B+ S+ 'r'*A\n r += 1\n\n\nprint(S[1:N].count(b))", 'n,a,b=map(int,input().sp...
['Runtime Error', 'Runtime Error', 'Accepted']
['s488682935', 's805458215', 's277120742']
[22144.0, 2940.0, 2940.0]
[2105.0, 17.0, 17.0]
[155, 109, 85]
p02754
u918601425
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B=[int(s) for s in input().split()]\nC=A+B\nQ=N//C\nR=N%C\nif R<=A:\n print(Q*A+C)\nelse:\n print((Q+1)*A)', 'N,A,B=[int(s) for s in input().split()]\nC=A+B\nQ=N//C\nR=N%C\nif R<=A:\n print(Q*A+R)\nelse:\n print((Q+1)*A)\n']
['Wrong Answer', 'Accepted']
['s120933656', 's503641222']
[3060.0, 2940.0]
[18.0, 18.0]
[105, 106]
p02754
u921617614
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b=map(int,input().split())\na*(n//(a+b))+min(n%(a+b),a)', 'n,a,b=map(int,input().split())\nprint(a*(n//(a+b))+min(n%(a+b),a))']
['Wrong Answer', 'Accepted']
['s676715755', 's240057448']
[3064.0, 2940.0]
[17.0, 17.0]
[58, 65]
p02754
u923270446
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, a, b = map(int, input().split())\nprint(a * (n // (a + b)) + min(a, n % (a + b))', 'n, a, b = map(int, input().split())\nif a >= n:\n print(n)\nelif n - (n // (a + b)) <= a:\n print(n // (a + b) * a + (n - (n // (a + b))))\nelse:\n print(n // (a + b) * a + a)', 'n,a,b=map(int,input().split())\nprint(a*(n/...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s211106946', 's720105889', 's401312073']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[82, 178, 65]
p02754
u927282564
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b=input().split()\ncicle=int(n/(a+b))\nres=n-cicle*(a+b)\nif res>a:\n ans=cicle*a+a\nelse:\n ans=cicle*a+res\nprint(ans)', 'n,a,b=(int(x) for x in input().split())\ncycle=int(n/(a+b))\nres=n-cycle*(a+b)\nif res>a:\n ans=cycle*a+a\nelse:\n ans=cycle*a+res\nprint(ans)']
['Runtime Error', 'Accepted']
['s894197227', 's535150849']
[2940.0, 2940.0]
[18.0, 18.0]
[119, 137]
p02754
u933193704
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = map(int, input().split())\nan = N // (A+B) * A\nrem = N % (A+B)\nan += min(rem,A)\nprint(ans)', 'N, A, B = map(int, input().split())\nan = N // (A+B) * A\nrem = N % (A+B)\nan += min(rem,A)\nprint(an)']
['Runtime Error', 'Accepted']
['s487102915', 's223679459']
[2940.0, 2940.0]
[17.0, 17.0]
[99, 98]
p02754
u934442292
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = [int(i) for i in input().strip().split()]\nif A < N:\n print(A)\nelse:\n q, r = divmod(N, A+B)\n print(A*q + r)\n', 'N, A, B = [int(i) for i in input().strip().split()]\nq, r = divmod(N, A+B)\nif r <= A:\n print(A*q + r)\nelse:\n print(A*q + A)']
['Wrong Answer', 'Accepted']
['s636084090', 's823488018']
[2940.0, 2940.0]
[18.0, 17.0]
[120, 124]
p02754
u936285815
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, a, b = map(int, input().split())\n\nt = n//(a+b)\n\nif t == 0 and n < a:\n c += n\n print(c)\nelif t == 0 and n >= a:\n c += a\n print(a)\nelif t > 0:\n c += t * a\n r = n%(a+b)\n if r == 0:\n print(c)\n elif r < a:\n c += r \n print(c)\n elif r > a:\n c += a\...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s093670579', 's538149673', 's679054854']
[3064.0, 3060.0, 2940.0]
[18.0, 17.0, 18.0]
[315, 242, 73]
p02754
u942051624
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['def numberofblues(N,A,B): \n \n if A==0:\n return 0\n elif N<=A:\n return N\n else:\n k=N//(A+B)\n l=N-A-k*(A+B)\n if l<=B:\n return A+k*A\n else:\n return A+k*A+l-B\n \nN,A,B=map(int, input().split())\nprint(numberofblues(N,A,B))', 'def n...
['Wrong Answer', 'Accepted']
['s390932477', 's158649176']
[3060.0, 3060.0]
[17.0, 17.0]
[294, 298]
p02754
u942788644
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, b, r = map(int, input().split())\n\nbr = b + r\n\na = n / br\na_ = n % br\n\nprint(a * b + (b if a_ >= b else a_))', 'n, b, r = map(int, input().split())\n\nbr = b + r\n\na = int(n / br)\na_ = n % br\n\nprint(a * b + (b if a_ >= b else a_))']
['Wrong Answer', 'Accepted']
['s403195104', 's101411454']
[2940.0, 2940.0]
[18.0, 18.0]
[110, 115]
p02754
u944886577
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b=map(int,input().split())\nlis=""\nans=0\nfor i in range(n):\n for b in range(a):\n ans+=1\n for r in range(b+1):\nprint(ans)', 'n,a,b=map(int,input().split())\nlis=""\nans=0\nfor i in range(n):\n for b in range(a):\n lis+=\'b\'\n ans+=1\n for r in range(b+1):\n lis+=\'r\'\nprint(ans)', 'n,a,b=map(int,input(...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s077049843', 's115918830', 's222974276', 's347049221', 's781248517', 's855803462', 's986945878', 's277749238']
[8804.0, 25656.0, 24560.0, 9020.0, 8908.0, 270060.0, 26580.0, 9168.0]
[31.0, 2206.0, 2206.0, 2206.0, 23.0, 2215.0, 2206.0, 26.0]
[124, 146, 146, 95, 104, 156, 142, 109]
p02754
u946517952
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,blue,red = map(int,input().split())\n\nmod = n % (blue+red)\nif mod <= blue:\n print(mod)\n print(blue*(n//(blue+red))+mod)\nelse:\n print(mod)\n print(blue*(n//(blue+red))+blue)\n', 'n,blue,red = map(int,input().split())\n\nmod = n % (blue+red)\nif mod <= blue:\n print(mod)\n print(blue*(n//(blue...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s037171075', 's625882000', 's798786801', 's208160705']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[185, 185, 185, 155]
p02754
u948050032
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["N, A, B = map(int, input().split())\nS = ''\nprint('N:{}'.format(N), 'A:{}'.format(A), 'B:{}'.format(B))\n\nfor i in range((N//(A+B))+1):\n S += 'b'*A\n S += 'r'*B\nprint(S[:N].count('b'))", "N, A, B = list(map(int, input().split()))\nprint('N:{}'.format(N), 'A:{}'.format(A), 'B:{}'.format(B))\n\nprint(A*(N//(A...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s814254705', 's885199785', 's920593157']
[1383572.0, 3060.0, 2940.0]
[2255.0, 17.0, 17.0]
[187, 177, 178]
p02754
u949595367
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = map(int, input().split())\nans = N//(A+B) * A\nrem = N%(A+B)\nans =+ min(rem, A)\nprint(ans)', 'N, A, B = map(int, input().split())\nans = N //(A+B) * A\nrem = N % (A+B)\nans += min(rem, A)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s122934842', 's950867351']
[2940.0, 3060.0]
[18.0, 19.0]
[98, 101]
p02754
u957872856
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = map(int,input().split())\nans = N//(A+B)\nR = N%(A+B)\nans += min(R, A)\nprint(ans)', 'N, A, B = map(int,input().split())\nans = (N//(A+B)) * A\nR = N%(A+B)\nans += min(R, A)\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s779760091', 's056317437']
[2940.0, 2940.0]
[17.0, 17.0]
[89, 96]
p02754
u961945062
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['i = list(map(int, input().split()))\n\nN = int(i[0])\nA = int(i[1])\nB = int(i[2])\n\ncount_blue = 0\ncount_all = 0\n\nwhile count_all < N:\n count_blue += A\n count_all += A\n if count_all > N:\n count_blue -= (count_all - N)\n count_all += B', 'i = list(map(int, input().split()))\n\nN = int(i[0])...
['Wrong Answer', 'Accepted']
['s488427604', 's276296812']
[3064.0, 3064.0]
[2104.0, 17.0]
[248, 239]
p02754
u963349415
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n, b, r = map(int, input().split())\n# inputText1 = "8 3 4"\ninputText1List = inputText1.split()\n# n = int(inputText1List[0])\n# b = int(inputText1List[1])\n# r = int(inputText1List[2])\nif b == 0:\n print(b)\nelse:\n \n baseTextCount = b + r # 7\n i = n // baseTextCount\n mod = n % baseTextCount\n ...
['Runtime Error', 'Accepted']
['s895409243', 's545019753']
[2940.0, 2940.0]
[18.0, 17.0]
[493, 168]
p02754
u963764813
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b= [int(x) for x in input().split()]\n\nans = n // (a+b)\nmod = n % (a+b)\nif mod >= a:\n ans += a\nelse:\n ans += mod\n \nprint(ans)\n ', 'n,a,b= [int(x) for x in input().split()]\n\nans = n // (a+b) * a\nmod_num = n % (a+b)\n\nif mod_num >= a:\n ans += a\nelse:\n ans += mod_num\n \nprint(ans)\n \n ']
['Wrong Answer', 'Accepted']
['s271129134', 's645614557']
[2940.0, 2940.0]
[17.0, 18.0]
[133, 153]
p02754
u964521959
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['\nN, A, B = map(int, input().split())\n\nS = N / (A+B)\nans = S*A\n\namari = N % (A+B)\nif(amari <= B):\n print(int(ans))\nelse:\n ans = ans + (amari - B)\n print(int(ans))', '\nN, A, B = map(int, input().split())\n\nS = N / (A+B)\nans = S*B\n\namari = N % (A+B)\nif(amari <= A):\n print(ans)\nelse:\n ans = ans +...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s250795328', 's922544808', 's897780544']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[204, 194, 219]
p02754
u967484343
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B = map(int,input().split())\n#n blue red\n#8 3 4\n#bbbrrrrb\n#4\nans = 0\nx = N // (A+B)\nans += (x * A)\nN -= x * (A+B)\nif N <= A:\n ans += N\nelse:\n ans += A\n', 'N,A,B = map(int,input().split())\n#n blue red\n#8 3 4\n#bbbrrrrb\n#4\nans = 0\nx = N // (A+B)\nans += (x * A)\nN -= x * (A+B)\nif N <= A:\n ans...
['Wrong Answer', 'Accepted']
['s320525988', 's071665348']
[8956.0, 9120.0]
[30.0, 30.0]
[157, 167]
p02754
u967822229
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["N, A, B = list(map(int, input().split()))\n\nblue=True\ns=''\nlength = N\nwhile length>0:\n if blue:\n for i in range(A):\n if len(s)<N:\n s+='b'\n length = length - A\n blue = False\n else:\n for i in range(B):\n if len(s)<N:\n s+=...
['Wrong Answer', 'Accepted']
['s176852150', 's718433212']
[18936.0, 8944.0]
[2206.0, 26.0]
[363, 149]
p02754
u970082363
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b = (int(x) for x in input().split())\n\nt = a+b\nq = n%t\np = (n-q)//t\n\nprint(min(p+q,p+a))\n', 'n,a,b = (int(x) for x in input().split())\n\nt = a+b\nq = n%t\np = (n-q)//t\nprint(min(a*p+q,a*p+a))']
['Wrong Answer', 'Accepted']
['s418369381', 's887459863']
[2940.0, 2940.0]
[18.0, 18.0]
[93, 95]
p02754
u970937288
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['b=map(int,input().split())\nprint((n//(a+b))*a+min([n%(a+b),a]))', 'n,a,b=map(int,input().split())\nprint(((n//(a+b))*a)+min([n%(a+b),a]))']
['Runtime Error', 'Accepted']
['s883240353', 's646476718']
[2940.0, 2940.0]
[17.0, 20.0]
[63, 69]
p02754
u971719367
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B=list(map(lambda i:int(i),input().split()))\n\nanswer =0\n\nif A==0:\n answer = 0\nelif b==0:\n answer = N\nelse:\n tail=0\n if N%(A+B) > B:\n tail = B\n else:\n tail = N%(A+B)\n answer = A * (N//(A+B)) + tail\n\nprint(answer)\n', 'N,A,B=list(map(lambda i:int(i),input().split()))\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s789840770', 's842639696', 's533139815']
[3060.0, 3060.0, 3060.0]
[18.0, 19.0, 18.0]
[248, 246, 248]
p02754
u981332890
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
["import math\n\n\ndef main():\n N, A, B = map(int, input().split())\n k = N // (A + B)\n g = N % (A + B)\n\n ans = (k * A) + A\n\n if A == 0:\n print(0)\n elif B == 0:\n print(N)\n elif N <= A:\n print(N)\n elif (N > A) and (N <= (A + B)):\n print(A)\n else:\n ...
['Wrong Answer', 'Accepted']
['s994953802', 's285659804']
[3064.0, 2940.0]
[18.0, 17.0]
[372, 106]
p02754
u982591663
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = map(int, input().split())\nans = 0\n\nAplusB = A+B\n\ntry:\n action_num = N // AplusB\nexcept:\n action_num = 0\nans += action_num * A\n\ntry:\n action_mod = N % AplusB\nexcept:\n action_mod = 0\n\n# one_action = "B"*A + "R"*B\nfor i in range(action_mod):\n if one_action[i] == "B":\n a...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s212725067', 's419941099', 's988542295', 's637953714']
[2940.0, 3060.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[319, 355, 323, 205]
p02754
u983327168
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b=map(int,input().split())\n\nprint(n//(a+b)*a+mi,min(a,n%(a+b))\n \n', 'n,a,b=map(int,input().split())\n\nprint(n//(a+b)*a+min(a,n%(a+b)))\n \n\n']
['Runtime Error', 'Accepted']
['s875852114', 's089347778']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 71]
p02754
u984276646
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N, A, B = map(int, input().split())\nX = N // (A + B)\nR = X * A\nX += min(A, N % (A + B))\nprint(X)', 'N, A, B = map(int, input().split())\nX = N // (A + B)\nR = X * A\nR += min(A, N % (A + B))\nprint(R)\n']
['Wrong Answer', 'Accepted']
['s087771772', 's750112511']
[2940.0, 2940.0]
[17.0, 18.0]
[96, 97]
p02754
u987164499
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['from sys import stdin\nn,a,b = map(int,stdin.readline().rstrip().split())\nif a <= n:\n print(a)\nelse:\n print(n)', 'from sys import stdin\nn,a,b = map(int,stdin.readline().rstrip().split())\nc = n//(a+b)\nd = n%(a+b)\nif d > a:\n print(a*(c+1))\nelse:\n print(a*c+d)']
['Wrong Answer', 'Accepted']
['s929502511', 's519023814']
[3316.0, 2940.0]
[21.0, 18.0]
[115, 149]
p02754
u989089752
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['n,a,b = map(int,input().split())\nc = a + b\nans = n//c*b + min(n%c,b)\n\nprint(ans)\n', 'n,a,b = map(int,input())\nc = a + b\nans = n/(a+b) + min(n%c,b)\n\nprint(ans)', 'n,a,b = map(int,input().split())\nc = a + b\nans = n/(a+b)*b + min(n%c,b)\n\nprint(ans)\n', 'n,a,b = map(int,input().split())\nc = a + b\nans = n/(...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s018212729', 's522448862', 's548149206', 's795315053', 's807289849']
[2940.0, 3064.0, 2940.0, 2940.0, 2940.0]
[17.0, 25.0, 18.0, 17.0, 18.0]
[81, 73, 84, 82, 81]
p02754
u991619971
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['#N = str(input())\nN,A,B = map(int,input().split())\n#X=list(map(int,input().split()))\n\nif A==0:\n print(0)\nelse:\n b=N//(A+B)\n x=N%(A+B)\n\nif x>A:\n x=A\n\n print(b*A+x)\n', '#N = str(input())\nN,A,B = map(int,input().split())\n#X=list(map(int,input().split()))\n\nif A==0:\n print(0)\n exit...
['Runtime Error', 'Accepted']
['s331908855', 's576326183']
[3064.0, 2940.0]
[19.0, 17.0]
[178, 219]
p02754
u993642190
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['\ndef main() :\n N,A,B = map(int,input().split())\n\n span_len = A+B\n \n span_count = N // span_len\n\n span_remain = N % span_len\n if (span_remain == 0) :\n ans = span_count * A\n print(ans)\n elif (span_remain < A) :\n ans = span_count * A + (A - span_remain)\n pri...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s410920075', 's825616140', 's116964023']
[3060.0, 3188.0, 3060.0]
[17.0, 18.0, 18.0]
[425, 454, 456]
p02754
u999482355
2,000
1,048,576
Takahashi has many red balls and blue balls. Now, he will place them in a row. Initially, there is no ball placed. Takahashi, who is very patient, will do the following operation 10^{100} times: * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row. How ...
['N,A,B=list(map(int,input().split()))\nprint(A*(N//(A+B))+max(A,N%(A+B)))', 'N,A,B=list(map(int,input().split()))\nprint(A*(N//(A+B))+min(A,N%(A+B)))']
['Wrong Answer', 'Accepted']
['s031289323', 's973032610']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 71]
p02755
u007627455
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['# coding: utf-8\n\na, b = map(int, input().split())\n# print(a,b)\n# x=-1\n# y=-1\n\n# xr=[]\n# yr=[]\n\n# if i*0.08//1==a:\n# # print("x:{}".format(i))\n# x=i\n# xr.append(x)\n\n\n# # print("y:{}".format(i))\n# y=i\n# yr.append(y)\n# flag=False\n#\n# result=[]\n\n#...
['Wrong Answer', 'Accepted']
['s967282930', 's649165319']
[3064.0, 2940.0]
[19.0, 17.0]
[674, 668]
p02755
u011202375
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\nA,B=map(int,input().split())\neight=[]\ni=0\nten=[]\nfor a in range(1,1001):\n if math.floor(a*0.08)==A:\n eight.append(a)\n if math.floor(a*0.1)==B:\n ten.append(a)\n\nfor a in eight:\n if a in ten:\n print(a)\n i=1\n break\nif i=0:\n print("-1")\n', 'impor...
['Runtime Error', 'Accepted']
['s260130337', 's075924206']
[9048.0, 9216.0]
[26.0, 30.0]
[291, 292]
p02755
u016182925
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a , b = map(int, input().split())\nfor i in range(1 , 10100) :\n a1 = int(i*0.08)\n b1 = int(i*0.10)\n if a1 = a and b1 = b :\n print(i)\n else :\n print(-1)', 'a , b = map(int, input().split())\na1 = a/0.08\nb1 = b/0.1\nif a1 == b1 :\n print(a1)\nelse :\n print(-1)', 'a , b = map(int, input().split())\nf...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s697580576', 's747790505', 's860266004', 's556042433']
[2940.0, 2940.0, 3572.0, 2940.0]
[17.0, 17.0, 32.0, 18.0]
[160, 101, 162, 160]
p02755
u017624958
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['inputted = list(map(int, input().split()))\ntax_price_a = inputted[0]\ntax_price_b = inputted[1]\n\nprice_8 = int(tax_price_a / 0.08)\nprice_10 = int(tax_price_b / 0.10)\n\nif price_8 == price_10:\n print(price_8)\nelif tax_price_b == int(price_8 * 0.1):\n print(price_8)\nelif tax_price_a == int(price_10 * 0.u)...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s039637313', 's054558526', 's302942918']
[3060.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0]
[349, 270, 332]
p02755
u023229441
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\na,b=map(int,input().split())\na1=math.ceil(a/0.08)\na2=math.floor((a+1)/0.08)\nA=set([i for i in range(a1,a2)])\nb1=math.ceil(b/0.1)\nb2=math.floor((b+1)/0.1)\nB=set([i for i in range(b1,b2)])\nprint(A)\nprint(B)\nif A&B==set(): \n print(-1)\n exit()\n\nprint(min(A & B))', 'import math\na,b=map(in...
['Wrong Answer', 'Accepted']
['s955936543', 's857390830']
[3064.0, 3064.0]
[18.0, 18.0]
[277, 260]
p02755
u023958502
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = map(int, input().split())\nfor i in range(20000):\n if i * 0.08 // 1 == A and i * 0.1 // 1 == B:\n print(i)\n break\nprint(-1)\n', 'A, B = map(int, input().split())\nfor i in range(20000):\n if i * 0.08 // 1 == A and i * 0.1 // 1 == B:\n print(i)\n exit()\nprint(-1)\n']
['Wrong Answer', 'Accepted']
['s918889209', 's752145080']
[2940.0, 3060.0]
[26.0, 28.0]
[146, 147]
p02755
u024782094
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b=map(int,input().split())\ni=1\nwhile True:\n if (int(i*0.08)==a and i(i*0.1)==b):\n print(i)\n exit()\n if i>200:\n print(-1)\n exit()\n i=i+1', 'a,b=map(int,input().split())\ni=1\nwhile True:\n if (i*0.08)//1==a and (i*0.1)==b:\n print(i)\n exit()\n if i>=100:\n print(-1)\n exit()\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s105177672', 's337415261', 's581811766']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[152, 150, 124]
p02755
u025463382
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['b,a = map(int,input().split())\nans = a*10\nfor i in range(11):\n if i == 10:\n ans = -1\n break\n if int(ans*0.08) == b:\n break\n ans += 1\n print(ans)\nprint(ans)', 'b,a = map(int,input().split())\nans = a*10\nfor i in range(11):\n if i == 10:\n ans = -1\n break\n ...
['Wrong Answer', 'Accepted']
['s465253703', 's520597551']
[2940.0, 3060.0]
[17.0, 17.0]
[188, 173]
p02755
u027547861
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = list(map(int, (input().split())))\n\nprice_a = int(A*100/8)\nprice_b = int(B*100/10)\n\nif(int(price_a * 1.10) - B == price_a) :\n print(int(price_a*1.08))\n print(price_a)\n exit()\nif(int(price_b * 1.08) - A == price_b) :\n print(price_b)\n exit()\n \nprint(-1)', 'import math\n\nA, B = list(map(int, in...
['Wrong Answer', 'Accepted']
['s828343353', 's974382095']
[3060.0, 3064.0]
[17.0, 17.0]
[263, 253]
p02755
u027561659
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B=map(int,input().split())\nmin_a=12.5*A;max_a=(100*a+1)/8\nmin_b=10*b;max_b=min_b+1\nif(max_b<min_a or max_a<min_b):\n print(-1)\nelse:\n print(int(round(max(12.5*A,10*B)+0.4999999,0)))', 'A,B=map(int,input().split())\nmin_a=12.5*A;max_a=(100a+1)/8\nmin_b=10*b;max_b=min_b+1\nif(max_b<min_a or max_a<min_b):\n pr...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s122670249', 's304281870', 's345328319', 's680183488', 's703602076', 's069511852']
[3060.0, 2940.0, 2940.0, 3064.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 18.0]
[184, 183, 183, 65, 184, 201]
p02755
u028014940
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import numpy as np\nimport math\nA, B = map(int, input().split())\n\nx_a = np.arange(math.ceil(12.5 * A), math.ceil(12.5 * (A + 1)))\nx_b = np.arange(10 * B, 10 * (B + 1))\n\na_set = set(x_a)\nb_set = set(x_b)\n\nc_set = a_set & b_set\nc = list(c_set)\nx = min(c)\nprint(x)\n\nif not c:\n print("-1")\n\nelse:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s172806859', 's464018962', 's633577442']
[3064.0, 2940.0, 21264.0]
[17.0, 17.0, 1360.0]
[343, 194, 335]
p02755
u030726788
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int,input().split())\n\nfor i in range(1,101):\n va = int(i * 1.08)\n vb = int(i * 1.1)\n if(va == a and vb == b):\n print(i)\n exit()\nprint(-1)', 'a,b = map(int,input().split())\n\nfor i in range(1,20001):\n va = int(i * 0.08)\n vb = int(i * 0.1)\n if(va == a and vb == b):\...
['Wrong Answer', 'Accepted']
['s558981909', 's710375447']
[3064.0, 2940.0]
[17.0, 28.0]
[170, 173]
p02755
u031722966
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['def main():\n A,B = map(int,input().split())\n for i in range(10001):\n e = i * 0.08\n t = i * 0.1\n if e == A and t == B:\n return i\n return -1\nprint(main())', 'def main():\n A,B = map(int,input().split())\n for i in range(10001):\n e = int(i * 0.08)\n t...
['Wrong Answer', 'Accepted']
['s316836491', 's966704687']
[2940.0, 3060.0]
[21.0, 22.0]
[193, 203]
p02755
u034777138
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\n\nA,B = map(int,input().split())\n\n\nARangemin = math.ceil(A * (100/8))\nBRangemin = math.ceil(B * (100/10))\n\nARangemax = ARangemin\nBRangemax = BRangemin\nwhile int(ARangemax * 0.08) == A:\n ARangemax = ARangemax + 1\nwhile int(BRangemax* 0.08) == B:\n BRangemax = BRangemax + 1\nARangemax = ARa...
['Wrong Answer', 'Accepted']
['s980015514', 's199419640']
[3064.0, 3064.0]
[17.0, 19.0]
[502, 579]
p02755
u035420666
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B = map(int, input().split())\n\nC = -(-A//0.08)\nD = -(-B//0.1)\n\n\nif (D * 1.0 < C * 1.1 < D * 1.1 < C * 1.2):\n print(int(C))\nelse:\n print(-1)\n', 'A,B = map(int,input().split())\n\na=-(-A//0.08)\nb=-(-B//0.1)\nc=-(-(A-1)//0.08)\nd=-(-(A+1)//0.08)\n\nif a==b or c < b < d:\n print(a)\nelse:\n print...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s071000116', 's100404870', 's238096714', 's462056756']
[3064.0, 3060.0, 2940.0, 3064.0]
[22.0, 17.0, 18.0, 18.0]
[148, 151, 149, 256]
p02755
u037098269
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\nA, B = map(int, input().split())\n\nans = 1\nfor b in range(10*B, 10*B+10):\n if int(b*0.08) == A:\n print(b)\n ans = 0\n\nif ans:\n print(-1)', 'import math\nA, B = map(int, input().split())\n\n#int(ans*0.08) = A\n#int(ans*0.10) = B\n\nans = 1\nfor b in range(10*B, 10*B+10):\n if ...
['Wrong Answer', 'Accepted']
['s602261312', 's185017318']
[3060.0, 3060.0]
[17.0, 18.0]
[165, 218]
p02755
u038024401
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['N, A, B = map(int, input().split())\n\ntmp = N%(A+B)\nif 0 <= tmp <= A:\n print(A*(N//(A+B))+tmp)\nelse:\n print(A*(N//(A+B)))', 'from math import floor, ceil\n\nA, B = map(int, input().split())\n\nminx1 = A/0.08\nmaxx1 = (A+1)//0.08\nminx2 = B/0.1\nmaxx2 = (B+1)//0.1\n\nrangeMin = max(minx1, minx2)\nrangeM...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s010160652', 's673206327', 's945769174', 's220374339']
[2940.0, 3060.0, 3060.0, 3064.0]
[17.0, 19.0, 19.0, 19.0]
[130, 263, 261, 273]
p02755
u044220565
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['# coding: utf-8\nA,B = list(map(int, input().split()))\n\ndef lr(A, tax):\n if (100 * A) % tax == 0:\n x1_l = 100 * A // tax\n else:\n x1_l = 100 * A // tax + 1\n if (100 * A + 100) % tax == 0:\n x1_r = (100 * A + 100) // tax - 1\n else:\n x1_r = (100 * A + 100) // tax\n pri...
['Wrong Answer', 'Accepted']
['s993751419', 's066882894']
[3064.0, 3064.0]
[18.0, 17.0]
[519, 497]
p02755
u045939752
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = map(int, input().split())\nfor x in range(1000):\n if int(x * 1.08) == A and int(x * 1.1) == B:\n print(x)\n break\nelse:\n print(-1)', 'A, B = map(int, input().split())\nfor x in range(1000000):\n if int(x * 0.08) == A and int(x * 0.1) == B:\n print(x)\n break\nelse:\n print(-1)']
['Wrong Answer', 'Accepted']
['s438982596', 's859024683']
[3060.0, 3060.0]
[18.0, 361.0]
[142, 145]
p02755
u046158516
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\n\nA,B=map(int, input().split())\nAmin=int(math.ceil(A/0.08))\nif A%2==0:\n Amax=int(math.floor((A+1)/0.08))\nelse:\n Amax=int(math.floor((A+1)/0.08)-1)\nBmin=int(math.ceil(B/0.1))\nBmax=int(math.floor((B+1)/0.1)-1)\nif Amax<Bmin or Bmax<Amin:\n ans=-1\nelse:\n ans=max(Amin,Bmin)\n\nprint(Amin...
['Wrong Answer', 'Accepted']
['s719239426', 's029644991']
[3064.0, 3064.0]
[18.0, 17.0]
[351, 303]
p02755
u049725710
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\na,b=map(int,input().split())\nax=set(range(math.ceil(25*a/2),math.floor(25*(a+0.99999)/2)+1))\nbx=set(range(math.ceil(10*b),math.floor(10*(b+0.99999)))+1)\nx=list(ax&bx)\nif x:\n print(x[0])\nelse:\n print(-1)', 'import math\na,b=map(int,input().split())\nfor i in range(2000):\n if math.floor((i+1)*0....
['Runtime Error', 'Accepted']
['s951299698', 's661095905']
[3060.0, 3060.0]
[18.0, 19.0]
[216, 159]
p02755
u050087249
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a, b = list(map(int, input().split()))\n\ntmp = int((a*12.5) // 1)\ncnt = tmp\n\nwhile (cnt*0.08)//1 == a:\n cnt += 1\n\nprint(tmp, cnt)\nfor i in range(tmp, cnt):\n ans = int((i * 0.1)//1)\n\n if ans == b:\n print(i)\n exit()\nprint(-1)', "a, b = list(map(int, input().split()))\n\ntmp = int((a*12.5) // 1)\n...
['Wrong Answer', 'Accepted']
['s566060776', 's013518122']
[3064.0, 3064.0]
[19.0, 21.0]
[231, 363]
p02755
u053035261
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int, input().split())\n\nx_b = b * 10\n\nx = int(x_b)\n\nif int(x * 0.08) == a:\n print(x)\nelse:\n print(x + 1)\n', 'a,b = map(int, input().split())\n\nx_b = b * 10\n\nmin_a = (25/2) * a\nmax_a = (25/2) * (a + 1)\n\nmin_b = 10 * b\nmax_b = 10 * (b + 1)\n\nmin_ = max(min_a, min_b)\nmax_ = min(max_a, m...
['Wrong Answer', 'Accepted']
['s373961908', 's029839162']
[3064.0, 3064.0]
[17.0, 18.0]
[120, 275]
p02755
u054556734
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import numpy as np\nimport scipy.sparse as sps\nimport scipy.misc as spm\nimport collections as col\nimport functools as func\nimport itertools as ite\nimport fractions as frac\nimport math as ma\nimport cmath as cma\nimport copy as cp\nimport sys\ndef sinput(): return sys.stdin.readline().strip()\ndef iinput(): retu...
['Wrong Answer', 'Accepted']
['s376461490', 's445744802']
[17028.0, 20236.0]
[190.0, 278.0]
[961, 1010]
p02755
u056100633
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a , b = map(int, input().split())\nar = a/.08\nb_r = b/.1\n\nif ar == b_r :\n print(ar)\n\nelse:\n if ar > b_r:\n if((ar-b_r)/10) < 1:\n print(ar)\n else:\n print(-1)\n else:\n if (( b_r - ar ) / 8) < 1:\n print(ar)\n else:\n print(-1)',...
['Wrong Answer', 'Accepted']
['s206639736', 's209589773']
[3064.0, 2940.0]
[17.0, 18.0]
[299, 197]
p02755
u060793972
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b=map(int, input().split())\nn=0\nfor i in range(a * 100 // 10):\n if int(i * 0.08) == a and int(i * 0.1) == b:\n print(i)\n n+=1\n break\nif n == 0:\n print(-1)', 'a,b=map(int, input().split())\nn=0\nfor i in range(a * 10 + 80000):\n if int(i * 0.08) == a and int(i * 0.1) == b:\n print(i)\n n+=1\...
['Wrong Answer', 'Accepted']
['s276841755', 's834896558']
[3060.0, 2940.0]
[17.0, 41.0]
[166, 167]
p02755
u062484507
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
["import math\nimport sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\na, b = map(int, readline().split())\n\nx = a / 0.08\ny = b / 0.1\nleft = math.floor(min(x, y))\nright = math.ceil(max(x, y))\nprint(x,y,left,right)\nfor i in range(left , right + 1):\...
['Wrong Answer', 'Accepted']
['s595650559', 's386794581']
[3064.0, 3064.0]
[25.0, 17.0]
[397, 375]
p02755
u063073794
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b =map(int,input().split())\nfor i in range(1009):\n if int (i*0.08)==a and int(i*0.1)==1:\n print(i)\n exit()\nprint(-1)', 'a,b =map(int,input().split())\nfor i in range(1009):\n if int (i*0.08)==a and int(i*0.1)==b:\n print(i)\n exit()\nprint(-1)\n']
['Wrong Answer', 'Accepted']
['s374936141', 's346817027']
[3064.0, 2940.0]
[22.0, 17.0]
[125, 126]
p02755
u066551652
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B = int(input())\nans = -1\nfor i in range(1010):\n if int(i*0.08) == A and int(i*0.1) == B:\n ans = i\n break\n\nprint(ans)', 'A,B = int(input())\nans = -1\nfor i in range(1010):\n if int(i*0.08) == A and int(i*0.1) == B:\n ans = i\n exit()\n\nprint(ans)', 'A,B = map(int, input()....
['Runtime Error', 'Runtime Error', 'Accepted']
['s109647965', 's791278364', 's583373500']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[136, 137, 141]
p02755
u073139376
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = map(int, input().split())\n\nfor p in range(10, 1010):\n if (8*p//100 == A) and (p//10 == B):\n print(p)\n break\n\nprint(-1)', '# A: 8%, B: 10%\nA, B = map(int, input().split())\n\n# B < 100 -> maxP = 1000\nfor p in range(10, 1010):\n if 8*p//100 == A and 10*p//100 == B:\n print(p)\n break\n\npr...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s091832059', 's166397310', 's925323303']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 18.0]
[132, 173, 206]
p02755
u075303794
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B=map(int,input().split())\nfor i in range(1,1010):\n if i*0.08==A and i*0.1==B:\n print(i)\n break\nelse:\n print(-1)\n ', 'A,B=map(int,input().split())\nfor i in range(1,1010):\n if (i*100*0.08)//100==A and (i*100*0.1)//100==B:\n print(i)\n break\nelse:\n print(-1)']
['Wrong Answer', 'Accepted']
['s713062418', 's895936224']
[9172.0, 9248.0]
[30.0, 29.0]
[125, 144]
p02755
u078932560
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = list(map(int, input().split()))\nfor i in range(1,1010):\n if int(i*8/100)==A and if int(i/10)==B:\n print(i)\n break\nelse:\n print(-1)', 'import math\nimport bisect\nimport numpy as np\n\nx_minA = math.ceil(100 / 8 * A)\nx_minB = 10 * B\nx_maxA = math.floor(100 / 8 * (A+1))\nx_maxB = 10 * (B+1)\nif ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s476036288', 's504253550', 's907789298', 's141759781']
[2940.0, 2940.0, 3064.0, 3064.0]
[18.0, 17.0, 20.0, 17.0]
[145, 507, 310, 375]
p02755
u080364835
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\na, b = map(int, input().split())\n\nflg = 0\nfor i in range(1, math.ceil(max(a,b)//0.08)):\n aa = math.floor(i * 0.08)\n bb = math.floor(i * 0.1)\n if a == aa and b == bb:\n print(i)\n flg = 1\n exit()\n\nif flg == 0:\n print(-1)\n', 'import math\na, b = map(int, input()....
['Wrong Answer', 'Accepted']
['s884920647', 's320946074']
[3060.0, 3060.0]
[18.0, 18.0]
[263, 265]
p02755
u082861480
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int,input().split())\nmagic = 0\nans = -1\n\nwhile a > magic * 0.08 and b > magic * 0.1:\n if magic * 0.08 == a and magic * 0.1 == b:\n ans = magic * 0.08\n break\n magic += 1\nprint(ans)\n', 'a,b = map(int,input().split)\nmagic = 0\nans = -1\n\nwhile a > magic * 0.08 and b > magic * 0...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s226062940', 's925872784', 's107588889']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0]
[211, 208, 234]
p02755
u089142196
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B = map(int,input().split())\nimport math\n\na_min=math.ceil(A/0.08)\nb_min=math.ceil(B/0.1)\na_list=[]\nb_list=[]\n\nfor i in range(a_min,a_min+12):\n a_list.append(i)\nfor j in range(b_min,b_min+10):\n b_list.append(j)\n\nprint(a_list)\nprint(b_list)\n \nans=-1\nfor item in a_list:\n if item in b_list:\n a...
['Wrong Answer', 'Accepted']
['s236869810', 's226149625']
[3064.0, 3064.0]
[17.0, 17.0]
[330, 301]
p02755
u089230684
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['def tax(a, b):\n mina, maxa = a/0.08, (a+1)/0.08\n minb, maxb = b/0.1, (b+1)/0.1\n print(mina, maxa, minb, maxb)\n if(mina >= maxb or minb >= maxa): return -1\n\n return max(int(mina), int(minb))\n\na, b= map(int, input().strip().split())\nprint(tax(a, b))', 'import math\n\nA, B = [int(x) for x in inpu...
['Wrong Answer', 'Accepted']
['s772958739', 's100778804']
[3064.0, 3064.0]
[18.0, 18.0]
[262, 347]
p02755
u089622972
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import sys\nreadline = sys.stdin.readline\ns = readline().strip()\nn = int(readline())\nrev = False\nfor i in range(n):\n q = readline()\n if q.startswith("1"):\n rev = not rev\n if q.startswith("2 1"):\n if not rev:\n s = q[-2] + s\n else:\n s = s + q[-2]\n if q...
['Runtime Error', 'Accepted']
['s563098125', 's305104484']
[3064.0, 3060.0]
[18.0, 18.0]
[456, 247]
p02755
u090972687
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\n\nA, B = map(int, input().split())\n\nfor n in range(0, 12):\n for m in range(0, 10):\n x = math.floor((A + n/10) / 0.08)\n y = math.floor((B + m/10) / 0.1)\n print(x, y)\n if x == y:\n if math.floor(x * 0.08) == A and math.floor(y * 0.1):\n print(x)\n exit()\nprint("-1")'...
['Wrong Answer', 'Accepted']
['s049853723', 's698734856']
[3060.0, 3060.0]
[18.0, 17.0]
[304, 300]
p02755
u091307273
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\n\ndef main():\n\n a, b = [int(i) for i in input().split()]\n\n lo = max(1000 * a, 800 * b)\n hi = min(1000 * (a + 1), 800 + (b + 1))\n\n if lo < hi:\n print(math.ceil(lo / 80))\n else:\n print(-1)\n\n\nmain()\n', 'import math\n\ndef main():\n\n a, b = [int(i) for i in inpu...
['Wrong Answer', 'Accepted']
['s909364500', 's076654184']
[9172.0, 9172.0]
[28.0, 29.0]
[236, 236]
p02755
u092646083
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = map(int, input().split())\nans = -1\nfor i in range(1251):\n if int(i / 0.08) == A and int(i / 0.1) == B:\n ans = i\n break\n\nprint(ans)', 'A, B = map(int, input().split())\nans = -1\n\nfor i in range(1251):\n if int(i * 0.08) == A and int(i * 0.1) == B:\n ans = i\n break\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s532684138', 's693891293']
[3064.0, 2940.0]
[19.0, 18.0]
[144, 145]
p02755
u093041722
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B = (int(x) for x in input().split())\na = range(math.ceil(A/0.08), math.floor(((A+1)/0.08)+1))\nb = range(math.ceil(B/0.1), math.floor(((B+1)/0.1)+1))\nc = set(a) & set(b)\nif len(c) == 0:\n print(-1)\nelse:\n print(min(c))', 'import math\nA,B = (int(x) for x in input().split())\nA1 = math.ceil(A...
['Runtime Error', 'Accepted']
['s717078430', 's691073821']
[3060.0, 3316.0]
[17.0, 19.0]
[237, 435]
p02755
u094103573
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['from collections import Counter\n\na, b = map(int, input().split())\n\n# a =< x < a + 1:\nmin_a = int(a/0.08)\n\nmax_a = (a+1)/0.08\n\nmin_b = int(b/0.10)\n\nmax_b = (b+1)/0.10\n\nans_list = []\n\nflag = True\n\nwhile(min_a < max_a):\n ans_list.append(min_a)\n min_a += 1\nprint(ans_list)\nwhile(min_b < max_b):\...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s419128674', 's603157631', 's616780014', 's299877783']
[3316.0, 3316.0, 2940.0, 3060.0]
[21.0, 20.0, 17.0, 18.0]
[498, 433, 496, 185]
p02755
u094425865
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
["import math\n\na,b = map(int,input().split())\n\nmotob = b/0.1\na += 0.999\nxmotoa = a/0.08\n\nprint(xmotoa,xmotob)\nif xmotoa >= motob:\n print(math.ceil(motoa))\nelse:\n print('-1')", "import math\n\na,b = map(int,input().split())\n\nmotoa = a/0.08\n\nmotob = b/0.1\na += 1\nb += 1\nxmotoa = a/0.08\nxmotob = b...
['Runtime Error', 'Accepted']
['s656422818', 's560204916']
[3060.0, 3060.0]
[17.0, 17.0]
[177, 253]
p02755
u094534261
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int,input().split())\n\nfor i in range(a//2,a):\n aa = ( i * 8 ) // 100\n bb = ( i * 10 ) // 100\n if aa == a and bb == b:\n print(i)\n exit()\nprint("-1")', 'a,b = map(int,input().split())\n\nfor i in range(1,10000):\n aa = ( i * 8 ) // 100\n bb = ( i * 10 ) // 100\n if aa =...
['Wrong Answer', 'Accepted']
['s581617020', 's529215872']
[9120.0, 9184.0]
[35.0, 33.0]
[180, 181]
p02755
u098982053
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B = map(int,input().split(" "))\n \nx = int(A/0.08)\ny = int(B/0.10)\n\nprint(x,y)\nif y>x:\n print(-1)\nelse:\n if abs(y-x)>=10:\n print(-1)\n else:\n while((int(y*0.10)==B)and y<x):\n y+=1\n print(y)', 'A, B = map(int, input().split(" "))\n\nC = 1009\nMin = 1010\n\nwhile(C...
['Wrong Answer', 'Accepted']
['s850647822', 's743629333']
[3064.0, 3064.0]
[17.0, 19.0]
[230, 262]
p02755
u100572972
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A,B= map(int,input().split())\n\nfor i in range(1300):\n if (int(i * 0.08) == A) and (int(i * 0.10) == B) :\n print(i)\n break\nprint(-1)', 'A,B= map(int,input().split())\n\nfor i in range(1251):\n if (int(i * 0.08) == A) and (int(i * 0.10) == B) :\n print(i)\n break\n if i == 125...
['Wrong Answer', 'Accepted']
['s673572082', 's509381429']
[3060.0, 3064.0]
[21.0, 18.0]
[148, 174]
p02755
u101839330
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int,input().split())\ngo = [0 for i in range(20)]\nad = [0 for i in range(101)]\nbd = [0 for i in range(101)]\no = 10\nfor i in range(100):\n for k in range(o,1010): \n if(k//12.5 == i+1): \n ad[i+1] = k\n o = k\n break\n\no = 10\nfor i in range(101):\n for k in range(o,1010): ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s018642582', 's331833561', 's132290428']
[3192.0, 3064.0, 2940.0]
[19.0, 20.0, 18.0]
[553, 587, 121]
p02755
u102223485
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['# coding: utf-8\n\nA, B = map(int, input().split())\n\n\nfor i in range(1, 1010):\n if(i * 0.08) == A and (i * 0.1) == B:\n print(i)\n exit()\nprint(-1)', '# coding: utf-8\n\nA, B = map(int, input().split())\nprint("A:", A, "B:", B)\n\nn = int(A / 0.08)\nm = int(B / 0.1)\nn1 = int((A + 1) / 0.08)\nm1...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s297901850', 's559887744', 's557482416']
[2940.0, 3068.0, 3060.0]
[20.0, 18.0, 18.0]
[185, 283, 217]
p02755
u103520789
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['P8, P10 = (8, 10)\n\nimport math\nprice1_min = math.floor(P8/0.08)\n\nprice1_max = math.floor((P8+1)/0.08)-1\n\nprice2_min = math.floor(P10/0.10)\n\nprice2_max = math.floor((P10+1)/0.10)-1\n\n\n\nif (price1_max > price2_min) and (price2_max > price1_min):\n print(max(price2_min, price1_min))\nelse: \n print(-1)...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s104301167', 's434983381', 's574044180', 's625430493', 's651052905', 's498911659']
[3060.0, 3064.0, 3064.0, 3064.0, 3064.0, 3060.0]
[18.0, 18.0, 17.0, 17.0, 18.0, 17.0]
[302, 374, 304, 390, 300, 319]
p02755
u105302073
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['from math import floor\n\na, b = [int(i) for i in input().split()]\nfor i in range(0, 1011):\n print(i, floor(i * 0.08), floor(i * 0.1))\n if floor(i * 0.08) == a and floor(i * 0.1) == b:\n print(i)\n break\nelse:\n print(-1)\n', 'from math import floor\n\na, b = [int(i) for i in input().split(...
['Wrong Answer', 'Accepted']
['s584786712', 's647910310']
[3572.0, 2940.0]
[20.0, 18.0]
[240, 185]
p02755
u107269063
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['A, B = map(int, input().split())\nans = -1\n\nfor i in range(1,1010):\n if int(1 * 0.08) == A and int(i * 0.1) == B:\n ans = i\n break\nprint(ans)\n', 'A, B = map(int, input().split())\nret = -1\n \nfor i in range(1,1010):\n if int(i * 0.08) == A and int(i * 0.1) == B:\n ret = i\n break\nprint...
['Wrong Answer', 'Accepted']
['s484354146', 's213683495']
[2940.0, 2940.0]
[17.0, 18.0]
[157, 147]
p02755
u108898293
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['import math\nl1=input().split(" ")\nt80=int(l1[0])\nt100=int(l1[1])\nt80_min=math.ceil(t80/0.08)\nt80_max=math.ceil((t80+1)/0.08)\nt100_min=math.ceil(t100/0.1)\nt100_max=math.ceil((t100+1)/0.1)\nf=0\nfor i in range(min(t80_min,t100_min),max(t100_max,t100_max)):\n if int(i*0.08)==a and int(i*0.1)==b:\n prin...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s113318720', 's512128932', 's576147951', 's876139125', 's912531075', 's753353518']
[3064.0, 3064.0, 3064.0, 3064.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0, 18.0, 17.0, 17.0]
[340, 308, 339, 264, 287, 219]
p02755
u111555888
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['\nimport sys\na,b=map(int,input().split())\n\nif a%2==0:\n lower1=int(a*100/8)\nelse:\n lower1=a*(100/8)\n upper1=int((a+1)*100/8)\n if (upper1)-int(lower1)<1:\n print(-1)\n sys.exit()\n else:\n lower1=int(lower1)+1\n if lower1=upper1:\n print(-1)\n sys.exit()\n else:\n pass\n \nlo...
['Runtime Error', 'Runtime Error', 'Accepted']
['s026456049', 's294986776', 's676047416']
[2940.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0]
[402, 487, 486]
p02755
u112247039
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
["a,b = map(int,input().split())\nfor i in range(1,1251):\n if int(i*0.08)==a and int(i*0.1)==b:\n print(i); break\nprint('-1')", 'a,b = map(int,input().split())\nlow = int(min(a//0.08,b//0.1))\nhigh = int(max((a+1)//0.08,(b+1)//0.1))\nfor i in range(low,high+1):\n if int(i*0.08)==a and int(i*0.1)==b:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s069213012', 's935018130', 's851474686']
[9128.0, 9188.0, 9184.0]
[27.0, 28.0, 27.0]
[131, 205, 215]
p02755
u115110170
2,000
1,048,576
Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d...
['a,b = map(int,input().split())\nans = -1\nfor i in range(1,b):\n if int(i*1.08) == a and int(i*1.10)==b:\n ans = i\n break\n \nprint(ans)', 'a,b = map(int,input().split())\nans = -1\nfor i in range(1,10000):\n if int(i*0.08) == a and int(i*0.10)==b:\n ans = i\n break\n \nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s678975766', 's577107102']
[2940.0, 3064.0]
[17.0, 22.0]
[140, 145]