s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s233573215
p03476
u329865314
1527114411
Python
Python (3.4.3)
py
Runtime Error
17
3060
235
n,m = map(int,input().split()) x,y = (n+m-2) , min((n-1),(m-1)) ans = 1 i, j = x, 1 while(i != x-y or j != y+1): if ans % j: ans *= i # print(i) i -= 1 else: ans //= j #print(j) j += 1 print(ans % 1000000007)
s583830033
p03476
u858575800
1527035310
Python
Python (3.4.3)
py
Runtime Error
363
27396
470
isPrime = [True for i in range(10001)] isPrime[1] = False isPrime[0] = False for i in range(2, 10001): if isPrime[i]: j = 2 while i*j <= 10000: isPrime[i*j] = False j += 1 q = int(input()) qu = list() for i in range(q): qu.append(list(map(int, input().split()))) for a ...
s879524921
p03476
u858575800
1527035252
Python
Python (3.4.3)
py
Runtime Error
355
27396
470
isPrime = [True for i in range(10001)] isPrime[1] = False isPrime[0] = False for i in range(2, 10001): if isPrime[i]: j = 2 while i*j <= 10000: isPrime[i*j] = False j += 1 q = int(input()) qu = list() for i in range(q): qu.append(list(map(int, input().split()))) for a ...
s372808249
p03476
u162660367
1526398147
Python
Python (3.4.3)
py
Runtime Error
17
3060
362
N=int(input().strip()) primes=sorted(eratosthenes(int(1e5))) p_set=set(primes) primes2=[] for p in primes:#MlogM if (p+1)//2 in p_set: primes2.append(p) for i in range(N):#N l,r=map(int,input().split()) li=binsearch_lb(primes2,l)#l以上のインデックス logM ri=binsearch_ub(primes2,r)#r以下のインデックス print(ri...
s239452252
p03476
u299801457
1522371869
Python
Python (3.4.3)
py
Runtime Error
17
2940
59
import gmpy2 n=int(input()) s=[[0] for i in range(100000)]
s231649666
p03476
u702582248
1522123045
Python
Python (3.4.3)
py
Runtime Error
1215
4272
554
work = [True] * 100001 work[0] = False work[1] = False primes = [] for i in range(100001): if work[i]: primes.append(i) for j in range(2, 100001 // i): work[j * i] = False ret = [i for i in primes if (i + 1) // 2 in primes] csum = [0] index = 0 for i in range(1, 10001): if i < ret[...
s211053092
p03476
u222841610
1519082126
Python
Python (3.4.3)
py
Runtime Error
376
28136
539
n = int(input()) lr = [None]*100000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.rmax**0.5+1)): if p[j] == 0: continue for i in range(2,rmax+1): if i!=j an...
s337285925
p03476
u222841610
1519081387
Python
Python (3.4.3)
py
Runtime Error
53
5452
556
import math n = int(input()) lr = [None]*10000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax+1): ...
s186501737
p03476
u222841610
1519081294
Python
Python (3.4.3)
py
Runtime Error
54
5452
558
import math n = int(input()) lr = [None]*10000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax+1): ...
s188085728
p03476
u222841610
1519080410
Python
Python (3.4.3)
py
Runtime Error
51
5452
561
import math n = int(input()) lr = [None]*10000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax+1): ...
s813702755
p03476
u222841610
1519077489
Python
Python (3.4.3)
py
Runtime Error
52
5452
538
import math n = int(input()) lr = [None]*10000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax+1): ...
s035877161
p03476
u222841610
1519076725
Python
Python (3.4.3)
py
Runtime Error
53
5452
585
import math n = int(input()) lr = [None]*10000 rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=1 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax+1): ...
s730070411
p03476
u222841610
1519076311
Python
Python (3.4.3)
py
Runtime Error
52
5452
549
import math n = int(input()) lr = [None]*10000 BT = False rmax = 0 for i in range(n): lr[i]= list(map(int,input().split())) if lr[i][1] > rmax: rmax = lr[i][1] p = [1]*(rmax+1) p[0]=0 p[1]=0 for j in range(2,int(math.sqrt(rmax)+1)): if p[j] == 0: continue for i in range(2,rmax...
s514580379
p03476
u146714526
1518882782
Python
Python (3.4.3)
py
Runtime Error
18
3064
1073
import itertools import pandas as pd import math from collections import defaultdict as dd import numpy as np import pandas as pd import math def check_num(target): check_count = 0 divines = [i for i in range(1, target+1)] for i in divines: if int(target%i) == 0: check_count += 1 ...
s675581652
p03476
u979075927
1518217230
Python
Python (3.4.3)
py
Runtime Error
102
4632
507
from functools import lru_cache from math import sqrt @lru_cache() def check(num): for i in range(2, int(sqrt(num)) + 1): if num % i == 0: return False return True @lru_cache() def pos(num): if num == 1: return 0 return pos(num - 1) + (1 if check(num) and check((num + 1) ...
s934448756
p03476
u881621300
1515475665
Python
Python (3.4.3)
py
Runtime Error
17
2940
560
import math def isPrime(num): if num < 2: return False else: rootNum = math.floor(math.sqrt(num)) for i in range(2,rootNum+1): if num % i == 0: return False return True def solve(): lst = [] count = int(input()) for i in range(count): ...
s005595771
p03476
u448407332
1515113608
Python
Python (3.4.3)
py
Runtime Error
25
4760
422
f = [False for i in range(100001)] c = [0 for i in range(100001)] for i in xrange(2, 100001): if not f[i]: for j in range(2*i, 100001, i): f[j] = True for i in xrange(3, 100001, 2): if not f[i] and not f[int((i+1)/2)]: c[i] += 1 for i in xrange(3, 100001): c[i] += c[i-1] n ...
s483474323
p03476
u638057737
1514768117
Python
Python (3.4.3)
py
Runtime Error
41
3188
773
Q = int(input()) isPrime = [-1 for x in range(10001)] isPrime[1],isPrime[2] = False,True for i in range(Q): ans = 0 l,r = map(int,input().split()) for c in range(l,r+1,2): other = (c+1)//2 if isPrime[c] == -1: for j in range(2,int(c**0.5)+1): if c % j == 0: ...
s643634483
p03476
u638057737
1514766916
Python
Python (3.4.3)
py
Runtime Error
41
3188
767
Q = int(input()) isPrime = [-1 for x in range(10001)] isPrime[1],isPrime[2] = False,True for i in range(Q): ans = 0 l,r = map(int,input().split()) for c in range(l,r+1,2): other = (c+1)//2 if isPrime[c] == -1: for j in range(2,int(c**0.5)+1): if c % j == 0: ...
s084538970
p03476
u286955577
1514698524
Python
Python (3.4.3)
py
Runtime Error
18
3828
338
num = [True]*(100000) num[0] = num[1] = False for i in range(2,int(max**0.5)+1): if num[i]: for j in range(i**2, max, i): num[j] = False for i in int(input()): _input = input().split(' ') sum = 0 for i in range(int(_input[0]), int(_input[1])+1): if (num[i]) and (num[int((i+1)/2)]): sum = su...
s461461418
p03476
u286955577
1514697685
Python
Python (3.4.3)
py
Runtime Error
304
17392
604
Q = int(input()) LR = [] max = 0 for i in range(Q): _input = input().split(' ') LR.append((int(_input[0]), int(_input[1]))) if max < LR[i][1]: max = LR[i][1] num = [True]*(max+1) num[0] = num[1] = False for i in range(2,int(max**0.5)+1): if num[i]: for j in range(i**2, max, i): num[j] = False f...
s838919421
p03476
u098572984
1514692074
Python
Python (3.4.3)
py
Runtime Error
2111
46812
1775
import numpy as np sosuu = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277...
s222077822
p03476
u482770395
1514691574
Python
Python (3.4.3)
py
Runtime Error
19
3448
4945
Nl = [3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253, 3313, 3517, 3733, 4021, 4057, 4177, 4261, 4273, 4357, 4441, 4...
s763717245
p03476
u286955577
1514691377
Python
Python (3.4.3)
py
Runtime Error
297
17428
916
def prime(n): num = [True]*n num[0] = num[1] = False for i in xrange(2,int(n**0.5)+1): if num[i]: for j in xrange(i**2, n, i): num[j] = False return [i for i in xrange(2,n) if num[i]] Q = int(input()) LR = [] max = 0 for i in range(Q): _input = input().split(' ') LR.append((int(_inp...
s387805134
p03476
u437068347
1514691276
Python
Python (3.4.3)
py
Runtime Error
586
30952
1088
from pprint import pprint as pp from functools import lru_cache import math """ 問題文 「N も (N+1)÷2 も素数」を満たす奇数 N を 2017に似た数 とします。 Q 個のクエリが与えられます。 クエリ i(1≦i≦Q) では奇数 li,ri が与えられるので、li≦x≦ri かつ 2017に似た数 となる奇数 x の個数を求めてください。 制約 1≦Q≦105 1≦li≦ri≦105 li,ri は奇数 入力は全て整数 入力 入力は以下の形式で標準入力から与えられる。 Q l1 r1 : lQ rQ 出力 i ...
s424287974
p03476
u794603719
1514691176
Python
Python (3.4.3)
py
Runtime Error
20
3188
1266
import re import math num = int(input()) sosuu = [2] max = 200 for i in range(3,max,2): flag = 1 flag2 = 0 for j in sosuu: if(j > math.sqrt(i)): flag2 += 1 if(flag2>2): break if(i % j == 0): flag = 0 break if(flag): sosuu.ap...
s226117049
p03476
u425351967
1514690865
Python
Python (3.4.3)
py
Runtime Error
29
3828
483
Q = int(input()) M = 10**5+5 primes = [True] * M primes[0] = False primes[1] = False for i in range(2, M): if primes[i]: for j in range(2, M//i+1): primes[i*j] = False print(primes) cnt = [0] * M for i in range(3, M): cnt[i] = cnt[i-1] if primes[i] and primes[(i+1)//2]: cnt[...
s506467888
p03476
u925364229
1514690624
Python
Python (3.4.3)
py
Runtime Error
2104
3820
5438
def showPrimeNum(N): """ N以下の素数を返すプログラム """ #素数でない場所に1をつけていくだけ is_prime_table = [0] * (N+1) is_prime_table[1] = 0 prime_list = [] for i in range(2,N//2+1): if is_prime_table[i] == 0: j = 2 * i #イテレータ初期化 while (j <= N): is_prime_table[j] = 1 j += i #掛け算より足し算の方が、計算コストが少なくて良い for i in range(1,N...
s673475294
p03476
u502314533
1514690424
Python
Python (3.4.3)
py
Runtime Error
97
3572
4198
import sys input = sys.stdin.readline print = sys.stdout.write sieve = [3,5,13,37,61,73,157,193,277,313,397,421,457,541,613,661,673,733,757,877,997,1093,1153,1201,1213,1237,1321,1381,1453,1621,1657,1753,1873,1933,1993,2017,2137,2341,2473,2557,2593,2797,2857,2917,3061,3217,3253,3313,3517,3733,4021,4057,4177,4261,4273,...
s749772876
p03476
u098572984
1514689841
Python
Python (3.4.3)
py
Runtime Error
2109
15512
74758
import numpy as np sosuu = np.array([2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, ...
s032241703
p03476
u875291233
1514689720
Python
Python (3.4.3)
py
Runtime Error
722
11076
562
import math Q=int(input()) N=10**4+1 L = [] R = [] for i in range(Q): ll,rr=[int(i) for i in input().split()] L.append(ll) R.append(rr) primeN = [2] for i in range(2, N): for j in range(len(primeN)): if i % primeN[j] == 0: break else: if j == len(primeN) - 1: ...
s409484963
p03476
u439333295
1514689522
Python
Python (3.4.3)
py
Runtime Error
17
3064
476
q = input() que = [] for i in range(q): r = input() que.append(r) def prime(n): half = n+1 / 2 for i in range(n): if n % i == 0: return(False) return(True) for i in range(len(que)): count = 0 a = int(que[i].split(" ")[0]) b = int(que[i].split(" ")[1]) c = mi...
s974490526
p03476
u439333295
1514689329
Python
Python (3.4.3)
py
Runtime Error
17
3064
460
q = input() que = [] for i in range(q): que.append(q) def prime(n): half = n+1 / 2 for i in range(n): if n % i == 0: return(False) return(True) for i in range(len(que)): count = 0 a = int(que[i].split(" ")[0]) b = int(que[i].split(" ")[1]) c = min(a, b) for ...
s913775023
p03476
u808427016
1514688911
Python
Python (3.4.3)
py
Runtime Error
298
26640
563
import sys Q = int(sys.stdin.readline().strip()) LR = [] for i in range(Q): LR.append([int(x) for x in sys.stdin.readline().strip().split()]) N = 10**5 Primes = list(range(N+1)) Primes[1] = 0 for p in Primes: if p * p > N+1: break if p == 0: continue for i in range(p + p, N+1, p): Primes[i] =...
s792552405
p03476
u432780056
1514688226
Python
Python (2.7.6)
py
Runtime Error
274
4584
424
p = [True] * 100000 for x in xrange(2, int(100000 ** 0.5) + 1): if p[x]: for y in xrange(2, 100000): if y * x >= 100000: break p[x * y] = False p[0], p[1] = False, False e, s = [], 0 for i in xrange(100000): e.append(s) if p[i] and p[(i + 1) / 2]: s +=...
s695057705
p03476
u798181098
1514688119
Python
Python (3.4.3)
py
Runtime Error
17
3064
397
def isprime(x): if x < 2: return False for d in range(2, int(x**0.5)+1): if x % d == p: return False return True isp = list(map(isprime, range(100001))) w = [0]*100001 for i in range(100001): if i > 2 and isp[i] and isp[(i + 1)//2]: w[i] = 1 for i in range(1,100001): w[i] += w[i-1] Q = int(input()...
s546305680
p03476
u926678805
1514686944
Python
Python (3.4.3)
py
Runtime Error
22
3316
593
from itertools import accumulate # Eratosthenes def eratosthenes(n): prime_table = [False,False,True]+[False if i%2!=0 else True for i in range(n-2)] i=3 while i*i<=n: if prime_table[i]: j=i*i while j<=n: prime_table[j]=False j+=i i+=2 ...
s054092728
p03477
u632413369
1600857860
Python
Python (3.8.2)
py
Runtime Error
24
9100
139
a, b, c, d = map(int, input().split()) l = a + b r = c + d if l > r: print('Left') elif l < r: print('Right') else: pritn('Balanced')
s347363098
p03477
u485349322
1600639424
Python
Python (3.8.2)
py
Runtime Error
23
8988
122
A,B,C,D=map(int,input(),split()) if A+B>C+D: print("Left") elif: A+B<C+D: print("Right") else: print("Balanced")
s687182964
p03477
u357289011
1600537296
Python
PyPy3 (7.3.0)
py
Runtime Error
111
74656
188
ans = 0 n, a, b = map(int, input().split()) for i in range(1, n + 1): t = 0 z = i while z > 0: t = t + z % 10 z = z // 10 if t >= a and t <= b: ans = ans + i print(ans)
s319359393
p03477
u963963908
1600039935
Python
Python (3.8.2)
py
Runtime Error
21
9172
131
N,A,B = map(int,input().split()) K = 0 for i in range(1,N+1): if A <= sum(list(map(int,str(i)))) <= B: K += i print(K)
s988290661
p03477
u183803097
1599370240
Python
Python (3.8.2)
py
Runtime Error
24
9140
290
from sys import stdin n, a, b = [int(x) for x in stdin.readline().rstrip().split()] sum = 0 for x in range(1,n+1): l = x // 10000 m = (x % 10000) // 1000 n = (x % 1000) // 100 o = (x % 100) // 10 p = x % 10 if l+m+n+o+p >= a and l+m+n+o+p <= b: sum += x print(sum)
s815811218
p03477
u972795791
1598734389
Python
Python (3.8.2)
py
Runtime Error
28
9040
253
N,A,B = input().split() N,A,B = map(int,(N,A,B)) f=0 for i in range(1,N+1): k=i a = i//10000 i = i-a*10000 b = i//1000 i = i-b*1000 c = i//100 i = i-c*100 d = i//10 i = i-d*10 e = i s = a+b+c+d+e if A<=s<=B: f += k print(f)
s680745232
p03477
u672866777
1598657849
Python
Python (3.8.2)
py
Runtime Error
28
9152
526
# -*- coding: utf-8 -*- # 整数の入力 N = int(input()) infos = [] for i in range(N): infos.append([int(s) for s in input().split()]) def check(): c_t = 0 c_x = 0 c_y = 0 for info in infos: n_t = info[0] n_x = info[1] n_y = info[2] d_t = n_t - c_t d_x = n_x - c_x d_y = n...
s840214050
p03477
u546440137
1598555715
Python
Python (3.8.2)
py
Runtime Error
22
8692
127
n,a,b=map(int,input().split()) count=0 for i in range(n+1): if a<=sum(map(int,str(i)))<=b: count+=i print(count)
s625640445
p03477
u054782559
1598554335
Python
Python (3.8.2)
py
Runtime Error
22
9012
120
a, b, c, d=map(int,input().split()) if a+b<c+d: print("Right") elif a+b=c+d: print("Balanced") else: print("Left")
s469084957
p03477
u054782559
1598554286
Python
Python (3.8.2)
py
Runtime Error
23
9032
124
a, b, c, d=map(int,input().split()) if (a+b<c+d): print("Right") elif (a+b=c+d): print("Balanced") else: print("Left")
s380104312
p03477
u054782559
1598554272
Python
Python (3.8.2)
py
Runtime Error
23
8988
123
a, b, c, d=map(int,input().split()) if (a+b<c+d): print("Right") elif(a+b=c+d): print("Balanced") else: print("Left")
s874503532
p03477
u463893436
1597943289
Python
Python (3.8.2)
py
Runtime Error
22
9112
140
n,a,b = map(int, input().split()) ans = 0 for i in range(1,n+1): if a <= sum([int(c) for c in str(i)]) <= b: ans += i print(ans)
s502238121
p03477
u071269360
1597606060
Python
Python (3.8.2)
py
Runtime Error
32
9460
254
from functools import reduce n,a,b = map(lambda x:int(x),input().split(" ")) ans = 0 for ni in range(a,n+1): add_each_dig = reduce(lambda x, y: int(x) + int(y), str(ni) ) if a <= add_each_dig and add_each_dig <= b: ans += ni print(ans)
s684709730
p03477
u442948527
1597369616
Python
Python (3.8.2)
py
Runtime Error
27
8772
86
a,b,c,d=map(int,input().split()) print([["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d])
s986444344
p03477
u442948527
1597369604
Python
Python (3.8.2)
py
Runtime Error
26
8828
79
a,b,c,d=map(int,input().split()) [["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d]
s751662249
p03477
u855387501
1597047057
Python
Python (3.8.2)
py
Runtime Error
26
8920
164
A = input() B = input() C = input() D = input() L = int(A)+int(B) R = int(C)+int(D) if L>R: print("Left") elif L == R: print("Balanced") else : print("Right")
s683320854
p03477
u855387501
1597046334
Python
Python (3.8.2)
py
Runtime Error
25
8992
164
A = input() B = input() C = input() D = input() L = str(A)+str(B) R = str(C)+str(D) if L>R: print("Left") elif L == R: print("Balanced") else : print("Right")
s548466696
p03477
u855387501
1597045550
Python
Python (3.8.2)
py
Runtime Error
24
9028
118
A = 10 B= 1 C= 2 D= 3 L = A + B R = C + D if L > R: print(Left) elif L == R: print(Balanced) else : print(Right)
s976549840
p03477
u729679908
1597014966
Python
Python (3.8.2)
py
Runtime Error
23
9248
417
N,A,B = map(int,input().split()) a=0 b=0 c=0 d=0 e=0 y=0 for i in range(1,N+1,1): n = str(i) if int(n)==10000: e=n[0] if 1000<=int(n)<10000: d=n[0] c=n[1] b=n[2] a=n[3] if 100<=int(n)<1000: c=n[0] b=n[1] a=n[2] if 10<=int(n)<100: b=n[0] a=n[1] if int(n)<10: a=n[...
s720577779
p03477
u572142121
1596056560
Python
Python (3.8.2)
py
Runtime Error
25
8912
119
A,B,C,D=map(int, input().split()) if A+B>C+D: print('Left') elif A+B>C+D:: print('Right') else: print('Balanced')
s425891461
p03477
u612635771
1595381120
Python
Python (3.8.2)
py
Runtime Error
25
9088
108
A, B, C, D = map(int, input()) print("Right" if (A+B) < (C+D) else "Balanced" if (A+B) == (C+D) else "Left")
s570909766
p03477
u548514780
1594316961
Python
Python (3.8.2)
py
Runtime Error
27
9192
227
N,A,B=map(int,input().split()) souryou=0 for i in range(N): j=i+1 j_str=str(j) goukei=0 for k in range(len(j_str)): goukei=goukei+int(j_str[k]) if goukei>=A and goukei<=B: souryou=souryou+j print(str(souryou))
s661610830
p03477
u548514780
1594314927
Python
Python (3.8.2)
py
Runtime Error
27
9172
140
A, B, C, D = [int(input()) for i in range(4)] if A+B>C+D: print('Left') elif A+B==C+D: print('Balanced') elif A+B<C+D: print('Right')
s300595346
p03477
u548514780
1594314730
Python
Python (3.8.2)
py
Runtime Error
23
9020
93
if A+B>C+D: print('Left') elif A+B==C+D: print('Balanced') elif A+B<C+D: print('Right')
s757693759
p03477
u706414019
1594164848
Python
Python (3.8.2)
py
Runtime Error
24
8956
176
import sys input = sys.stdin.readline A,B,C,D=list(map(int,input().split())) if A+B == C+D: print('Balanced') elif A+B > C+D: print('Left') else: print('Right')
s814000338
p03477
u047931063
1593928886
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74428
126
A, B, C, D = map(int,input().split()) if A+B > C+D: print("Left") elif A+B = C+D: print("Balanced") else: print("Right")
s589901761
p03477
u763280125
1593315130
Python
Python (3.8.2)
py
Runtime Error
25
8756
161
I = input().split() A, B, C, D = [int(i) for i in I] if int(A + B > C + D: print('Left') elif A + B < C + D: print('Right') else: print('Balanced')
s416481768
p03477
u042347918
1592182471
Python
Python (3.4.3)
py
Runtime Error
17
3060
521
""" B - Some Sums """ ans = 0 #入力される数n, a, b N, a, b = map(int, input().split()) def digitSum(n): d = str(n) #iの数値を文字列に変換 d ← 下記eにおいてitrrableなものが求められるため文字列に変換する #print(d) e = list(map(int, d)) #1文字ずつ数値化し配列にする #print(e) f = sum(e) return f #print(a, b, n) for i in range(N+1): digitSum(i...
s904844119
p03477
u498136917
1592177256
Python
Python (3.4.3)
py
Runtime Error
17
2940
148
n, a, b = map(int, input().split()) count = 0 for i in range(1, n+1): if a <= sum(map(int,list(str(i)))) <= b: s += i print(s)
s887155161
p03477
u867703757
1592009016
Python
Python (3.4.3)
py
Runtime Error
17
2940
181
#include<stdio.h> int main() { int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(a+b>c+d)printf("Left\n"); else if(a+b=c+d)printf("Balanced\n"); else printf("Right\n"); }
s506835675
p03477
u867703757
1592008841
Python
Python (3.4.3)
py
Runtime Error
17
2940
180
#include<stdio.h> int main() { inf a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(a+b>c+d)printf("Left\n"); else if(a+b=c+d)printf("Balanced\n"); else printf("Right\n"); }
s893713698
p03477
u626228246
1591927003
Python
Python (3.4.3)
py
Runtime Error
17
2940
132
A,B,C,D = map(int,input().split()) if (A+B) = (C+D): print("Balanced") elif (A+B) < (C+D): print("Right") else: print("Left")
s759547494
p03477
u626228246
1591926911
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
A,B,C,D = map(int,input().split()) if A+B = C+D: print("Balanced") elif A+B < C+D: print("Right") else: print("Left")
s846161657
p03477
u626228246
1591926741
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
A,B,C,D = map(int,input().split()) if A+B = C+D: print("Balanced") elif A+B < C+D: print("Right") else: print("Left")
s618543848
p03477
u425762225
1591674029
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
from math import * def solve(x,y,ans=1): return 1 + ceil(log2(y/x)) X,Y = map(int,input().split()) print(solve(X,Y))
s294675119
p03477
u946370443
1591426119
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38256
150
N,A,B=map(int,input().split()) ans=0 for i in range(1,N+1): D=0 for j in str(i): D+=int(j) if A<=D<=B: ans+=i print(ans)
s613995267
p03477
u180824420
1591334206
Python
Python (3.4.3)
py
Runtime Error
17
3064
126
A,B,C,D=map(int,input().split()) if (A+B)>(C+D): print('left') elif (A+B)=(C+D): print('Balanced') else: print('Right')
s551681403
p03477
u075878544
1591055056
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
a,b,c,d=map(int, input().split()) L=a+b,R=c+d if L>R: print('Left') elif L==R: print('Balanced') else: print('Right')
s763730088
p03477
u272495679
1590963558
Python
Python (3.4.3)
py
Runtime Error
18
3060
197
N,A,B = map(int,input().split()) Sum = 0 for n in range(N+1): s = 0 strn = str(n) for i in strn: s += int(i) if s >= A and s<= B: Sum += n print("{}".format(Sum))
s496168281
p03477
u874001579
1590407218
Python
Python (3.4.3)
py
Runtime Error
17
3064
506
import sys sys.setrecursoinlimit(10**6) #Some Sums n,a,b = int(input()), int(input()), int(input()) n_list = [] for i in range(1,n+1): n_list.append(str(i)) #evaluete acpt = [] for i in range(n): if len(n_list[i]) == 1: if a <= int(n_list[i]) <= b: acpt.append(int(n_list[i])) else: acpt.append(0) else:...
s070814512
p03477
u860002137
1590210433
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
a, b, c, d = map(int, input().split()) diff = a + b - c - d print("Left" if diff > 0 "Balanced" if diff == 0 else "Right")
s842234353
p03477
u247211039
1589895470
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
A, B, C, D = map(int, input().split()) print('Left' if A + B > C + D, else 'Balanced' if A + B == C + D else 'Right')
s085489425
p03477
u115877451
1589425593
Python
Python (3.8.2)
py
Runtime Error
23
9104
116
a,b,c,d=map(int,input()) if a+b>c+d: print('Right') elif (a+b)==(c+d): print('Balanced') else: print('Left')
s121119321
p03477
u493130708
1589356460
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38256
2265
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math from collections import deque from fractions import gcd from functools import lru_cache ############# # Constants # ############# MOD = 10**9+7 INF = float('inf') ############# # Functions # ######...
s334490351
p03477
u332793228
1589265763
Python
Python (3.4.3)
py
Runtime Error
17
2940
84
l,r=map(int,input().split()) print("Left"if l>r else "Balanced"if l==r else "Right")
s255887136
p03477
u911472374
1589257322
Python
Python (3.4.3)
py
Runtime Error
17
3060
264
N, A, B = map(int, input().split()) ans = 0 def somesum(x): total = 0 while x > 0: total += x % 10 x = x / 10 return total for i in range(N + 1): total = somesum(i) if total >= A and total <= B: ans += i print(ans)
s065073387
p03477
u027403702
1589134262
Python
Python (3.4.3)
py
Runtime Error
17
2940
187
A,B,C,D = map(int, input().split()) # A = int(input()) # B = int(input()) # C = int(input()) # X = input() L = A + B R = C + D print("Left" if L > R else "Balanced" if L = R else "Right")
s055005667
p03477
u534319350
1588803942
Python
Python (3.4.3)
py
Runtime Error
17
2940
152
a,b,c,d = (int(i) for i in input(.split())) x = a + b y = c + d if x > y: print('Left') elif x < y: print('Right') else: print('Balanced')
s314370474
p03477
u373288887
1588736325
Python
Python (3.4.3)
py
Runtime Error
17
2940
98
C,D=map(int,input().split()) print("Left" if A+B > C+D else "Balanced" if A+B == C+D else "Right")
s063989710
p03477
u165268875
1588728747
Python
Python (3.4.3)
py
Runtime Error
16
2940
112
A, B, C, D = map(int, input().split()) print("Left" if (A+B)>(C+D) else "Balanced" if (A+B)==(C+D) else "Right
s475062998
p03477
u165268875
1588728687
Python
Python (3.4.3)
py
Runtime Error
17
2940
111
A, B, C, D = map(int, input().split()) print("Left" if (A+B)>(C+D) else "Balanced" if (A+B)=(C+D) else "Right
s880308405
p03477
u073139376
1588724775
Python
Python (3.4.3)
py
Runtime Error
17
2940
130
a, b, c, d = map(int, input().split()) if a + b > c + d: print('Left') elif a + b == c + d: print('Balanced') else print('Right')
s339341837
p03477
u073139376
1588724738
Python
Python (3.4.3)
py
Runtime Error
18
2940
131
a, b, c, d = map(int, input().split()) if (a + b > c + d) print('Left') elif (a + b == c + d) print('Balanced') else print('Right')
s598611480
p03477
u080986047
1588704893
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38384
237
def libra(l,r): if l>r: return "Left" elif l == r: return "Balanced" else: return "Right" def sum(a,b): c = a+b return c a,b,c,d=[int() for in input().split()] print(libra(sum(a,b),sum(c,d)))
s180079592
p03477
u636481117
1588478842
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38256
175
a,b,c = map(int,input().split()) sum = 0 for x in range(a+1): i = x // 10 ii = x - 10 * i iii = i + ii if b <= iii and c >= iii: sum += x print(sum)
s969182421
p03477
u018591138
1588470851
Python
Python (3.4.3)
py
Runtime Error
17
3060
287
N,A,B = map(int, input().split()) count = 0 for i in range(1,N+1): m = 0 tmp = i for t in range(1, len(str(i))+1): #print(tmp) m += tmp%10 tmp /= 10 tmp = int(tmp) if( A <=m and m <= B): count += i print(count)
s930181276
p03477
u857673087
1588366905
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
A,B,C,D = map(int, input().split()) print('Left' if A+B > C+D 'Balanced' elif A+B == C+D else 'Right')
s194145933
p03477
u857673087
1588366855
Python
Python (3.4.3)
py
Runtime Error
17
2940
103
A,B,C,D = map(int, input().split()) print('Left' if A+B > C+D else 'Balanced' A+B == C+D else 'Right')
s455066178
p03477
u781105394
1588205368
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38384
462
n=int(input("N=")) a=int(input("A=")) b=int(input("B=")) count=1 sum=0 while count<=n : ts=int(count/10000) #print(" "+str(ts)) s=int(count/1000) #print(" "+str(s)) h=int(count/100) #print(" "+str(h)) t=int(count/10) #print(" "+str(t)) o=count%10 #print(" "+str(o)) #print("t...
s756079197
p03477
u650236619
1588168144
Python
Python (3.4.3)
py
Runtime Error
17
2940
97
a,b,c,d=map(int,input().split()) print("balanced" if a+b=c+d else "left" if a+b>c+d else "right")
s385657810
p03477
u650236619
1588168095
Python
Python (3.4.3)
py
Runtime Error
17
2940
97
a,b,c,d=map(int,input().split()) print("balanced" if a+b=c+d else "left" if a+b>c+d else "right")
s450541327
p03477
u650236619
1588168076
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
a,b,c,d=map(int,input().split()) print("balanced" if a+b=c+d else "left" if a+b>c+d else "right" a+b<c+d)
s833655547
p03477
u873756840
1587869559
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38256
147
n, a, b, = map(int,input().split()) ans = 0 for i in range(n+1): if a <= sum(list(map(int,list(str(i))))) <= b ans += i print(ans)