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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02547 | u923342518 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["N = input()\ncount = []\nfor i in range(N):\n d1,d2,d3 = input().split()\n if (d1==d2)&(d2==d3):\n print('Yes')\n sys.exit()\n else:\n count.append(0)\nif sum(count)==0:\n print('No')", "N = input()\ncount = 0\nc = 0\nfor i in range(N):\n d1,d2,d3 = input().split()\n if (d1==d2)... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s280002847', 's577491366', 's651913156', 's720974458'] | [9040.0, 8956.0, 9180.0, 9168.0] | [25.0, 31.0, 24.0, 33.0] | [206, 257, 250, 224] |
p02547 | u923762723 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["n=int(input())\nxy = [map(int, input().split()) for _ in range(n)]\nx, y = [list(i) for i in zip(*xy)]\nans=''\nfor i in range(n-2):\n if x[i]==y[i] and x[i+1]==y[i+1] and x[i+2]==y[i+2]:\n ans='Yes'\n else:\n ans='No'\nprint(ans)", "n=int(input())\nxy = [map(int, input().split()) for _ in range(n)]\nx, y = [... | ['Wrong Answer', 'Accepted'] | ['s279094261', 's936434645'] | [9128.0, 9188.0] | [31.0, 30.0] | [229, 210] |
p02547 | u926266624 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["N = int(input())\nflg = False\ncount = 0\nfor i in range(N):\n D1,D2 = map(int, input().split())\n\n if D1 == D2:\n count += 1\n if count >= 3:\n flg = True\n break\n else:\n count = 0\n\nif flg:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nflg = False\ncount = 0\nfor i in ran... | ['Wrong Answer', 'Accepted'] | ['s546469817', 's511889023'] | [9176.0, 9176.0] | [25.0, 35.0] | [243, 227] |
p02547 | u935241425 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['n = int( input() )\n#print( n )\n\nd1 = [ 0 ] * n\nd2 = [ 0 ] * n\n#print( d1, d2 )\n\nfor i in range( n ):\n d1[ i ], d2[ i ] = map( int, input().split() )\n\n#print( d1, d2 )\n\n\nfor i in range( n-2 ):\n if d1[ i ] == d2[ i ]:\n if d1[ i+1 ] == d2[ i+1 ]:\n if d1[ i+2 ] == d2[ i+2 ]:\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s272516374', 's394511525', 's907639721'] | [9188.0, 9096.0, 9164.0] | [26.0, 26.0, 28.0] | [341, 219, 227] |
p02547 | u936050991 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["n = int(input())\n\ncount = 0\nans = 0\nfor i in range(n):\n s = input().split()\n \n if s[0]==s[1]:\n count += 1\n else:\n count = 0\n\nif ans >= 3:\n print('Yes')\nelse:\n print('No')", "n = int(input())\n\ncount = 0\nans = 0\nfor i in range(n):\n s = input().split()\n \n if... | ['Wrong Answer', 'Accepted'] | ['s111203245', 's074256693'] | [9196.0, 9016.0] | [28.0, 27.0] | [202, 236] |
p02547 | u936988827 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['n = int(input())\nz = []\ny = 0\nfor i in range(n):\n line = input().split(" ")\n if int(line[0])==int(line[1]):\n z.append(i)\n\nfor i in range(n-3):\n if z[i]==z[i+1]-1:\n if z[i+1]==z[i+2]-1:\n y += 1\nif y > 0:\n print("Yes")\nelse:\n print("No")\n', 'n = int(input())\nz = []\ny = 0\nfor i in rang... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s092480990', 's373866091', 's423648781', 's432533460', 's563895843', 's585253379'] | [9148.0, 9200.0, 9180.0, 9192.0, 9184.0, 9136.0] | [32.0, 28.0, 29.0, 30.0, 31.0, 30.0] | [252, 263, 252, 256, 248, 256] |
p02547 | u951985579 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["N = int(input())\ncount = 0\nfor i in range(N):\n D1, D2 = map(int, input().split())\n if D1 == D2:\n count += 1\n elif D1 != D2:\n break\nif (count >= 3):\n print('Yes')\nelse:\n print('No')", 'N = int(input())\ncount = 0\nD1_arr = []\nD2_arr = []\nfor i in range(N):\n D1, D2 = map(in... | ['Wrong Answer', 'Accepted'] | ['s455007630', 's005485833'] | [9164.0, 9092.0] | [27.0, 27.0] | [209, 339] |
p02547 | u957799665 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['N = int(input())\ni=0\ncnt = 0\nflg = 1\n\nwhile i < N:\n i += 1\n a, b = map(int, input().split())\n if a==b:\n cnt += 1\n else:\n cnt = 0\n\nif cnt >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\ni=0\ncnt = 0\nflg = 0\n\nwhile i < N:\n i += 1\n a, b = map(int, in... | ['Wrong Answer', 'Accepted'] | ['s780293412', 's013018748'] | [9112.0, 9176.0] | [29.0, 30.0] | [207, 250] |
p02547 | u957843607 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['n = int(input())\nnum_lis = [list(map(int, input().split()))]\nc = 0\nfor i,j in num_lis:\n if c == 3:\n break\n if i == j:\n c += 1\n else:\n c = 0\n\nif c == 3:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\nnum_lis = [list(map(int, input().split())) for i in range(n)]\nc = 0\n\nfor i,j in n... | ['Wrong Answer', 'Accepted'] | ['s391250961', 's014749992'] | [9072.0, 9060.0] | [30.0, 29.0] | [198, 217] |
p02547 | u958482966 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["n = int(input())\na = []\nfor i in n:\n x,y = map(int,input().split())\n a.append([x,y])\ncount = 0\nflag = True\nfor x in a:\n if x[0] == x[1]:\n count += 1\n if count == 3:\n print('Yes')\n flag = False\n break\n else:\n count = 0\n\nif flag:\n pr... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s573536776', 's793073670', 's413672812'] | [9192.0, 9212.0, 9188.0] | [24.0, 25.0, 30.0] | [309, 301, 316] |
p02547 | u966648240 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['n=int(input())\nans=0\nD=[]\nfor i in range(n):\n a,b=map(int, input().split())\n D.append([a,b])\n\n\nfor i in range(len(D)):\n if D[i][0]==D[i][1]:\n ans +=1\n else:\n if ans>0:\n ans -= 1\n\nif ans>=3:\n print("Yes")\n \nelse:\n print("No")', 'n=int(input())\nans=0\nD=[]\nA=[]\nfor i in range(n):... | ['Wrong Answer', 'Accepted'] | ['s484444470', 's297168968'] | [9124.0, 9224.0] | [33.0, 33.0] | [242, 269] |
p02547 | u968431218 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["#python\nfor _ in range(int(input())):\n\tn1,n2=map(int,input().split())\n\tif n1==n2:\n\t\tc+=1\n\t\tm=max(m,c)\n\telse:\n\t\tm=max(m,c)\n\t\tc=0\nif m>=3:\n\tprint('Yes')\nelse:\n\tprint('No')", "for _ in range(int(input())):\n\tn1,n2=map(int,input().split())\n\tif n1==n2:\n\t\tc+=1\n\t\tm=max(m,c)\n\telse:\n\t\tm=... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s775836976', 's782264588', 's888229858', 's920666923'] | [9156.0, 9104.0, 9196.0, 9188.0] | [26.0, 24.0, 30.0, 31.0] | [169, 172, 161, 173] |
p02547 | u971182332 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["n = int(input())\n\nnum_list=[]\ncount=0\n\nfor i in range(n):\n a,b = map(int, input().split())\n if a==b:\n count+=1\n if a!=b:\n if count<3:\n count=0\nif count>2:\n print('YES')\nelse:\n print('NO')", "n = int(input())\n\ncount=0\n\nfor i in range(n):\n a,b = map(int, in... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009268780', 's288668876', 's700132002', 's787635005', 's183822524'] | [9172.0, 9184.0, 9208.0, 9172.0, 9172.0] | [24.0, 29.0, 34.0, 31.0, 26.0] | [227, 223, 293, 241, 225] |
p02547 | u973167272 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ["N = int(input())\nl = [list(map(int, input().split())) for l in range(N)]\n \nfor i in range(len(l)):\n if l[i][0]==l[i][1]:\n if l[i+1][0]==l[i+1][1]:\n if l[i+2][0]==l[i+2][1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n \n else:\n print('No')", "ro... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s049079189', 's428444812', 's669300213'] | [9136.0, 9184.0, 9152.0] | [29.0, 32.0, 28.0] | [298, 321, 585] |
p02547 | u993790346 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['n=int(input())\ncount = 0\nlast = 0\nfor a in range(n):\n z = list(input().split())\n if int(z[0]) == int(z[1]):\n count+=1\n if count >= 3:\n last = 1\n if int(z[0]) != int(z[1]):\n if count > 0:\n count = 0\n else:\n continue\nif last == 1:\n ... | ['Wrong Answer', 'Accepted'] | ['s049209981', 's027962147'] | [9188.0, 9184.0] | [28.0, 31.0] | [345, 345] |
p02547 | u999799597 | 2,000 | 1,048,576 | Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold. | ['s = int(input())\nd = [[int(v) for v in input().split()] for i in range(s)]\nprint(d)\nans = False\ncnt = 0\nfor j in range(len(d)):\n if all(elem == d[j][0] for elem in d[j]):\n cnt += 1\n else:\n cnt = 0\n\n if cnt == 3:\n ans = True\n break\nif ans:\n print ("Yes")\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s047880692', 's013792184'] | [9204.0, 9176.0] | [34.0, 30.0] | [315, 307] |
p02548 | u002625175 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['\ndef main():\n n = int(input())\n cnt = 0\n same = 0\n\n for a in range(1, n):\n for b in range(a, n):\n if a * b >= n:\n break\n\n cnt += 1\n if a == b:\n same += 0\n\n print((cnt - same) * 2 + same)\n\n\n\nmain()\n', '\ndef main():\n n = int(input())\n cnt = 0\n same = 0\n\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327273568', 's427968523', 's507549444'] | [9168.0, 9164.0, 9168.0] | [980.0, 980.0, 1000.0] | [234, 234, 234] |
p02548 | u035453792 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans=0\nfor i in range(1,n):\n ans+=int(cnt-1)\nprint(ans)', 'import sympy', 'n = int(input())\nans=0\nfor i in range(1,n):\n ans+=int((n-1)/i)\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s031949155', 's496031485', 's639968819'] | [9180.0, 9084.0, 9080.0] | [24.0, 24.0, 233.0] | [74, 12, 76] |
p02548 | u050663669 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nn = int(input())\nans = 0\nfor i in range(n):\n ans += n//(i+1)\nprint(ans-int(math.sqrt(n-1)))', 'import math\nn = int(input())\nans = 0\nfor i in range(1,n):\n ans += (n-1)//i\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s647460356', 's697193200'] | [9044.0, 9072.0] | [160.0, 161.0] | [105, 87] |
p02548 | u070423038 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\n\ncount = 0\n\nfor i in range(1, n//2):\n temp = n // i\n if temp * i < n:\n count += temp\n else:\n count += temp - 1\n\nprint(count + n//2)\n', 'n = int(input())\n\ncount = 0\nstart = n//2\nif (n % 2 == 1):\n start += 1\n\nfor i in range(1, start):\n temp = n // i\n ... | ['Wrong Answer', 'Accepted'] | ['s091634095', 's196317798'] | [9152.0, 9168.0] | [135.0, 129.0] | [172, 218] |
p02548 | u074220993 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['def main():\n N = input()\n ans = 0\n for c in range(1, N):\n ans += solve(N-c)\n print(ans)\n\ndef solve(n):\n res = 0\n for i in range(1,n//2):\n if n % i == 0:\n res += 1\n return res\n\nmain()', 'def main():\n N = int(input())\n ans = 0\n for c in range(1, N)... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s391537479', 's880527085', 's842813559'] | [9096.0, 9192.0, 9104.0] | [24.0, 2206.0, 114.0] | [228, 233, 101] |
p02548 | u088474961 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans = 0\nfor i in range(1,n):\n\tans += n/i\n\tif n%i == 0:\n\t\tans -= 1\nprint(ans)\t\t', 'n = int(input())\nans = 0\nfor i in range(1,n):\n\tans += n//i\n\tif n%i == 0:\n\t\tans -= 1\nprint(ans)\t\t'] | ['Wrong Answer', 'Accepted'] | ['s329377578', 's210152960'] | [9004.0, 9020.0] | [189.0, 199.0] | [95, 96] |
p02548 | u102816329 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\n\nN = int(input())\n\nyakusu = [0] * N+1\nyakusu[1] = 1\nfor i in range(2,N+1):\n for j in range(1,i):\n if i*j > N:\n break\n yakusu[i*j] += 2\n \n yakusu[i*i] += 1\n\ncounter = 0\nfor num in yakusu[1:N]:\n counter += num\n \nprint(counter)\n\n\n ', 'N = int(input())\n\ncounter = ... | ['Runtime Error', 'Accepted'] | ['s166806756', 's332838710'] | [16580.0, 9136.0] | [33.0, 1280.0] | [263, 183] |
p02548 | u125269142 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['%%time\nn = int(input())\n\n# c = N - a*b\ncnt = 0\nfor a in range(1, n, 1):\n for b in range(1, n, 1):\n if n <= a*b:\n break\n else:\n if a != b:\n cnt += 2\n else:\n cnt += 1\n break\n\nprint(cnt)', 'n = int(input())\n\n... | ['Runtime Error', 'Accepted'] | ['s682418083', 's892407119'] | [8816.0, 9176.0] | [26.0, 1561.0] | [278, 271] |
p02548 | u167908302 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['# coding:utf-8\nn = int(input())\nans = 0\n\nfor a in range(n):\n ans += (n - 1) // a\n\nprint(ans)\n', '# coding:utf-8\nn = int(input())\nans = 0\n\nfor a in range(1, n):\n ans += (n - 1) // a\n\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s983821669', 's914389222'] | [9128.0, 9148.0] | [26.0, 150.0] | [96, 99] |
p02548 | u170349801 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nNR = int(N**0.5)\ncount = 0\nif int(N/2)-N/2 == 0:\n for i in range(1,int(N/2)):\n if int(N/i)-N/i == 0:\n count += int(N/i)-1\n else:\n count += int(N/i)\nelse:\n for i in range(1,int(N/2)+1):\n if int(N/i)-N/i == 0:\n count += int(N/i)-1\... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s056234986', 's435688897', 's454319632', 's624934736', 's821869158', 's494210057'] | [9460.0, 9112.0, 9304.0, 9004.0, 9324.0, 9148.0] | [225.0, 244.0, 268.0, 26.0, 281.0, 462.0] | [364, 361, 390, 184, 387, 176] |
p02548 | u175590965 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans =0\n\nfor i in range(1,n):\n ans +=(n-1)//a\nprint(ans)', 'n = int(input())\nans =0\n\nfor i in range(1,n):\n ans +=(n-1)//i\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s024855028', 's521706569'] | [9096.0, 9124.0] | [25.0, 154.0] | [75, 75] |
p02548 | u185405877 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['k=int(input())\n\n\ncnt=0\nfor i in range(1,k):\n for j in range(i,k+2):\n if i*j<k:\n cnt+=1\nprint(cnt)\n ', 'k=int(input())\n\n\ncnt=0\nif k>6:\n for i in range(7,k):\n for j in range(1,k):\n \n \n if i*j<k:\n cnt+=1\n ... | ['Wrong Answer', 'Accepted'] | ['s448189035', 's533198136'] | [9148.0, 9188.0] | [2205.0, 1988.0] | [127, 269] |
p02548 | u200488698 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ["\n#!/usr/bin/env python\nfrom typing import List\n\n\ndef input_int() -> int:\n return int(input())\n\n\ndef input_list_int() -> List[int]:\n return list(map(lambda x: int(x), input().split()))\n\n\ndef f(n: int) -> int:\n ans = 0\n for a in range(1, n - 1):\n ans += (n - 1) // a\n return ans\n\... | ['Wrong Answer', 'Accepted'] | ['s239915907', 's246482731'] | [10124.0, 10184.0] | [111.0, 110.0] | [363, 358] |
p02548 | u206890818 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nimport collections\nimport bisect\nfrom collections import deque\nfrom copy import copy, deepcopy\nimport time\n\nimport numpy as np\nimport numba\nfrom numba import njit, b1, i4, i8, f8\nfrom numba import jit\n\n\ndef main():\n N = int(input())\n count=0\n ans=False\n for i in range(N):\n ... | ['Runtime Error', 'Accepted'] | ['s599714652', 's968041903'] | [91764.0, 91756.0] | [381.0, 476.0] | [525, 419] |
p02548 | u217551556 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nNR = int(N**0.5)\ncount = 0\nfor i in range(1,int(N/2)):\n if int(N/i)-N/i == 0:\n count += int(N/i)-1\n else:\n count += int(N/i)\n\ncount += int(N/2)\nprint(count)', 'N = int(input())\nNR = int(N**0.5)\ncount = 0\nif int(N/2)-N/2 == 0:\n for i in range(1,int(N/2)):\n ... | ['Wrong Answer', 'Accepted'] | ['s706610082', 's866617268'] | [9320.0, 9464.0] | [232.0, 245.0] | [193, 381] |
p02548 | u221272125 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nans = 0\nfor i in range(1,N-1):\n x = (N-1)//i\n ans += x\nprint(ans)', 'def num_divisors(prime_count):\n num = 1\n \n for prime, count in prime_count.iteritems():\n num *= (count + 1)\n \n return num\nN = int(input())\nans = 1\nfor i in range(2,N):\n ans += um_divisor... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s104480540', 's163013776', 's439602746', 's690248919', 's707461398', 's611451542'] | [9192.0, 9168.0, 9232.0, 9184.0, 9264.0, 9168.0] | [179.0, 32.0, 30.0, 2206.0, 26.0, 176.0] | [88, 226, 532, 404, 225, 86] |
p02548 | u233386602 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['def prime_factorize(n):\n a = 0\n while n % 2 == 0:\n a += 1\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a += 1\n n //= f\n else:\n f += 2\n if n != 1:\n a += 1\n return a\n\nn = int(input())\nc = 0\nfor i in range(1, n... | ['Wrong Answer', 'Accepted'] | ['s485325973', 's715961430'] | [9176.0, 16720.0] | [2205.0, 1272.0] | [339, 203] |
p02548 | u239653493 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=int(input())\ncount=0\nfor i in range(1,int(n**(1/2))):\n for j in range(i,n):\n if i*j>=n:\n break\n elif i==j:\n count+=1\n else:\n count+=2\nif (int(n**(1/2)))**2==n:\n print(count)\nelse:\n print(count+1)', 'n=int(input())\ncount=0\nfor i in range(1... | ['Wrong Answer', 'Accepted'] | ['s394003321', 's299799966'] | [9440.0, 9424.0] | [1185.0, 1236.0] | [260, 207] |
p02548 | u240444124 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['s=0\nn=int(input())-1\nfor i in range(n):s+=(i+1)//n\nprint(s)', 's=0\nn=int(input())-1\nfor i in range(n):s+=n//(i+1)\nprint(s)'] | ['Wrong Answer', 'Accepted'] | ['s034755692', 's314988617'] | [9168.0, 9144.0] | [141.0, 168.0] | [59, 59] |
p02548 | u243312682 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ["from operator import mul\nfrom functools import reduce\n\ndef main():\n def factorization(n):\n l = []\n tmp = n\n for i in range(2, int(-(-tmp**0.5//1))+1):\n if tmp%i == 0:\n cnt = 0\n while tmp%i == 0:\n cnt += 1\n ... | ['Wrong Answer', 'Accepted'] | ['s356325220', 's092210993'] | [9984.0, 9020.0] | [2206.0, 102.0] | [766, 242] |
p02548 | u255943004 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nans = 0\nfor a in range(N):\n ans += N//a\nprint(ans)', 'N = int(input())\nans = 0\nfor a in range(N):\n ans += (N//a)\nprint(ans)\n', 'N = int(input())\nans = 0\nfor a in range(1,N):\n ans += N//a\nprint(ans)\n', 'N = int(input())\nans = 0\nfor a in range(1,N):\n ans += (N-1)//a\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s336865264', 's516087467', 's953627661', 's974970118'] | [9108.0, 9156.0, 9160.0, 9120.0] | [26.0, 25.0, 133.0, 153.0] | [68, 71, 71, 75] |
p02548 | u261103969 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['def solve():\n ans = 0\n for a in range(1, N):\n for b in range(1, N):\n x = a * b\n if x >= N:\n break\n ans += 1\n return ans\n\nN = int(input())\nans = solve()\nprint(ans)\n', 'N = int(input())\nans = 0\nfor a in range(1, N):\n ans += (N - 1) // a\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s954284785', 's210010117'] | [9096.0, 9144.0] | [1167.0, 152.0] | [199, 82] |
p02548 | u263173473 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=int(input())\ncounter=0\nfor i in range(1,n+1):\n for j in range(1,n+1):\n for k in range(1,n-i*j):\n if((i*j+k)==n):\n counter=counter+1\nprint(counter)', 'n=int(input())\ncounter=0\nfor i in range(1,n+1):\n for j in range(1,n+1):\n for k in range(1,n-i*k):\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s086721158', 's904930842', 's791448689'] | [9192.0, 9172.0, 9140.0] | [2206.0, 24.0, 160.0] | [184, 184, 91] |
p02548 | u264312747 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\ncount = 0\nfor a in range(1, n):\n count += (n - 0.5) // a\nprint(count)', 'n = int(input())\ncount = 0\nfor a in range(1, n):\n count += (n - 0.5) // a\nprint(int(count))\n'] | ['Wrong Answer', 'Accepted'] | ['s671249766', 's626824588'] | [9136.0, 9160.0] | [238.0, 234.0] | [89, 95] |
p02548 | u273339216 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())-1\ncount=0\ner=0\nj = 0\nfor i in range(1, n):\n j=i\n if i*j>n:\n break\n count+=1\n j+=1\n\nprint(count)', 'N = int(input())\nans = 0\nfor a in range(1, N):\n ans += (N - 1) // a\nprint(ans)\n '] | ['Wrong Answer', 'Accepted'] | ['s115141753', 's527686487'] | [9084.0, 9100.0] | [33.0, 154.0] | [119, 84] |
p02548 | u297089927 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=int(input())\ng=lambda x:(x*(n//x)*(n//x+1))//2\nprint(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1)))', 'n=int(input())\ng=lambda x:(x*(n//x)*(n//x+1))//2\nprint(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1))))', 'n=int(input())\nans=0\nfor i in range(1,n):\n ans+=(n-1)//i\nprint(a... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s173348013', 's922354708', 's665231921'] | [8940.0, 9184.0, 8980.0] | [29.0, 233.0, 162.0] | [118, 119, 68] |
p02548 | u303711501 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['\nn=int(input())\n#d = [list(map(int,input().split())) for _ in range(s)]\n\ndef p(val):\n print(val)\n\ncount = 0\n\n\n\nfor i in range(1,n):\n \n\n \n\n \np(count)', '\nn=int(input())\n#d = [list(map(int,input().split())) for _ in range(s)]\n\ndef p(val):\n print(val)\n\ncount = 0\n\n\n\nfor i in... | ['Runtime Error', 'Accepted'] | ['s490266791', 's712164807'] | [8976.0, 9064.0] | [29.0, 157.0] | [318, 334] |
p02548 | u306412379 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\ncnt = 0\n\nfor i in range(3,n):\n for j in range(1,n//i+1):\n if i * j < n:\n cnt +=1\n \nprint(cnt+n-1+n//2-1)\n ', 'n = int(input())\ncnt = 0\n\nfor i in range(3,n):\n for j in range(1,n//i+1):\n if i * j < n:\n cnt +=1\n \nprint(cnt+n-1+(n-1)//2)'] | ['Wrong Answer', 'Accepted'] | ['s184970151', 's636768882'] | [9160.0, 9172.0] | [1978.0, 1994.0] | [140, 137] |
p02548 | u331906013 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nn = int(input())\nk = int(math.sqrt(n)) if n != k ** 2 else int(math.sqrt(n)) - 1\nans = 0\nfor i in range(1, k + 1):\n t = int((n - 1) / i)\n ans += (t- i + 1) * 2\n if n != i ** 2:\n ans -= 1 \nprint(ans)', 'import math\nn = int(input())\nk = int(math.sqrt(n)) if n != k ** 2 else int(ma... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s415342897', 's453145421', 's483280657', 's952544458'] | [9184.0, 9092.0, 9192.0, 9128.0] | [28.0, 23.0, 29.0, 34.0] | [226, 226, 146, 212] |
p02548 | u335406314 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['from numba import njit\n\n@njit\ndef factorize1(n):\n ans=dict()\n i = 2\n while i*i<=n:\n while n%i==0:\n n=n//i\n if i in ans:\n ans[i]+=1\n else:\n ans[i]=1\n i+=1\n if n!=1:\n ans[n]=1\n \n div=1\n for j i... | ['Time Limit Exceeded', 'Accepted'] | ['s329111328', 's675914624'] | [112712.0, 9160.0] | [2209.0, 152.0] | [433, 74] |
p02548 | u348293370 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\na = 1\nans = 0\n \n# while a < n/2:\n# b = 2\n# while a * b < n:\n# ans += 1\n# b += 1\n# a += 1\n \n# print(ans+2*(n-2)+1)\n\nwhile a < n:\n if n % a == 0:\n ans += 1\n a += 1\n\nprint(ans)', 'n = int(input())\na = 1\nans = 0\n \n# while a < n/2:\n# b = ... | ['Wrong Answer', 'Accepted'] | ['s600785724', 's691402780'] | [9152.0, 9168.0] | [164.0, 165.0] | [231, 211] |
p02548 | u376324032 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nN = int(input())\nans = 0\nve = math.floor(math.sqrt(N))\nfor st in range(ve):\n tmp = math.floor(N/(st+1)-0.000001)\n score = 2*(tmp - st)\n if score > 0:\n score -= 1\n ans += score', 'import math\nN = int(input())\nans = 0\nve = math.floor(math.sqrt(N))\nfor st in range(ve):\n tm... | ['Wrong Answer', 'Accepted'] | ['s693259605', 's484626792'] | [9180.0, 9164.0] | [30.0, 28.0] | [206, 217] |
p02548 | u412255932 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['from functools import lru_cache\nN = int(input())\n\ncount = 0\nfor A in range(1, N-1):\n # B <= (N - 1) // A\n count += (N - 1) // A\nprint(count)', 'from functools import lru_cache\nN = int(input())\n\ncount = 0\n\nfor A in range(1, N):\n # B <= (N - 1) // A\n count += (N - 1) // A\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s354199668', 's430769543'] | [9564.0, 9560.0] | [161.0, 164.0] | [192, 215] |
p02548 | u419655514 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ["def readInt():\n return int(input())\ndef readList():\n return list(map(int,input().split()))\ndef readMap():\n\treturn map(int,input().split())\ndef readStr():\n return input()\ninf=float('inf')\nmod = 10**9+7\nimport math\nfrom itertools import permutations\ndef solve(N):\n count=0\n for i in range(1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s416361419', 's562531686', 's864553903'] | [8952.0, 30456.0, 9196.0] | [31.0, 2366.0, 101.0] | [425, 504, 377] |
p02548 | u437215432 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['from sympy import divisor_count\nn = int(input)\ncount = 0\nfor c in range(1, n):\n count += divisor_count(c)\nprint(count)\n', 'n = int(input)\ncount = 0\nfor c in range(1, n):\n count += divisor_count(c)\nprint(count)\n', 'n = int(input()) - 1\nlst = [n // k for k in range(1, int(n**0.5+1))]\nprint(2 * sum(ls... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s700030689', 's811932895', 's551842322'] | [8948.0, 8968.0, 9424.0] | [24.0, 28.0, 29.0] | [122, 90, 106] |
p02548 | u463470469 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['#include <bits/stdc++.h>\nusing namespace std;\n\nint main() {\n int N;\n cin >> N;\n int ans = 0;\n for (int i = 0; i < N-1; i++) {\n \n for (int j = 0; j < i+1;j++){\n \n if ((i+1)%(j+1) == 0) {\n ans += 2;\n \n }\n }\n }\n \n cout << ans;\n}\n', 'N = int(input())\nans ... | ['Runtime Error', 'Accepted'] | ['s333551810', 's007059907'] | [9004.0, 9124.0] | [25.0, 181.0] | [272, 94] |
p02548 | u463945054 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\n\nk=0\n\nfor s in range(1,N):\n k = (N-1) // s\n t += k \n \nprint (t)\n', 'N = int(input())\n\nk = 0\n\nfor s in range(1,N) :\n k = (N-1) // s\n t += k \n \nprint(k)', 'N = int(input())\n\nk=0\n\nfor s in range(1,N):\n k += (N-1) // s\n \n \nprint (k)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s017955583', 's540318347', 's534867037'] | [9124.0, 9080.0, 9108.0] | [26.0, 32.0, 153.0] | [84, 85, 80] |
p02548 | u509214520 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nN = int(input())\n\nsum = 0\nfor i in range(1, N):\n count = 2 \n for j in range(2, int(math.floor(math.sqrt(i)))+1):\n if i % j == 0:\n if i/j == j:\n count += 1\n else:\n count += 2\n sum += count\n\nprint(sum)', 'import math\nN = int(... | ['Wrong Answer', 'Accepted'] | ['s537441236', 's903776653'] | [9036.0, 9180.0] | [2206.0, 160.0] | [279, 95] |
p02548 | u527979509 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) \nprint(ans)', 'n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) // a\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s488762212', 's353494356'] | [9156.0, 9088.0] | [137.0, 159.0] | [75, 79] |
p02548 | u543000780 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nls = [0]*(N)\nn = 1\nwhile n <= N-1:\n k = 1\n tmp = 0\n while k**2 <= n:\n if n % k == 0:\n if k ** 2 = n:\n tmp += 1\n else:\n tmp += 2\n ls[n] = tmp\nprint(sum(ls))', 'N = int(input())\nans = 0\nfor n in range(1,N):\n ans += int((N-1)/n)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s640562019', 's830540097'] | [8972.0, 9100.0] | [24.0, 243.0] | [203, 78] |
p02548 | u555878443 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input()) - 1\n\nj = 0\n\nans = 0\n\nfor i in range(1, n // 2):\n \n j = i\n \n while True:\n j += 1\n if i * j > n:\n break\n ans += 1\n\nk = 1\n\ner = 0\n\nwhile True:\n if k ** 2 > n:\n break\n er += 1\n k += 1\n\nprint((ans * 2) + er)', 'n = int(i... | ['Wrong Answer', 'Accepted'] | ['s237044383', 's306111186'] | [9156.0, 9104.0] | [1332.0, 1432.0] | [279, 274] |
p02548 | u556477263 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nn1 = n -1\nprint(n1 + n - 1)', 'n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) // a\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s070591433', 's016493747'] | [9048.0, 9092.0] | [30.0, 157.0] | [44, 82] |
p02548 | u556571816 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\n \nfor i in range(1,n):\n ans += (n-1)//i\nprint(ans)', 'n = int(input())\n\nfor i in range(1,n):\n ans += (n-1)//a\nprint(ans)', 'n = int(input())\n \nans = 0\nfor i in range(1,n):\n ans += (n-1)//i\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s069908134', 's718878380', 's893458724'] | [9108.0, 9148.0, 8980.0] | [26.0, 26.0, 152.0] | [68, 67, 76] |
p02548 | u568426505 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N=int(input())\ncount=0\nfor c in range(1,N):\n for a in range(1,N-c+1):\n if (N-c)%a > 0:\n count = count+1\nprint(count)', 'N=int(input())\ncount=0\n\nfor a in range(1,N):\n count = count + (N-1)//a\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s489434057', 's442288820'] | [9192.0, 9124.0] | [2205.0, 153.0] | [125, 140] |
p02548 | u578441226 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans = 0\nfor a in range (1,n):\n for b in range (1,n):\n if n < (a * b):\n ans += 1\nprint(ans)', 'n = int(input())\nans = 0\nfor a in range (1,n):\n for b in range(a, n, a):\n ans += 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s793053109', 's379729817'] | [9124.0, 9024.0] | [2206.0, 1444.0] | [118, 103] |
p02548 | u609561564 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N=int(input())\nans=1\nfor x in range(3,N+1):\n tmp=x-1\n\tans+=tmp//x\n \nprint(ans)', 'N=int(input())\nans=0\nfor x in range(1,N):\n ans+=(N-1)//x\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s258806310', 's241340770'] | [8980.0, 9072.0] | [25.0, 160.0] | [81, 69] |
p02548 | u621596556 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\ncount = 0\n\nfor i in range(1,n):\n for j in range(1,n):\n if(a*b < n):\n count += 1\n \nprint(count)', 'n = int(input())\ncount = ((n-1) * 2) -1\n\nfor i in range(2,n):\n if(i*2 >= n):\n break\n for j in range(2,n):\n if(i*j < n):\n count += 1\n else:\n break\n ... | ['Runtime Error', 'Accepted'] | ['s031938497', 's919480788'] | [9168.0, 9168.0] | [28.0, 1874.0] | [125, 184] |
p02548 | u629540524 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import numpy as np\nN=int(input())\ndiv = np.zeros(N+1, np.int64)\nfor n in range(1, N+1):\n for m in range(n, N+1, n):\n div[m] += 1\nprint(sum(div))', 'import numpy as np\nN=int(input())\ndiv = np.zeros(N+1, np.int64)\nfor n in range(1, N+1):\n for m in range(n, N+1, n):\n div[m] += 1\nprint(sum(div))... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s194824126', 's276121228', 's457036727', 's198645273'] | [34460.0, 34544.0, 34640.0, 9152.0] | [2207.0, 2206.0, 2207.0, 165.0] | [148, 154, 154, 68] |
p02548 | u645183909 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['case_num = 0\n\nN = int(input())\n\nfor num in range(N - 1):\n num += 1\n \n case_num += ( math.ceil(N / num) - 1 )\n\n\nprint(case_num)\n', 'N = int(input())\n\ncase_num += N / 2\nhalf_num = case_num\n\nfor num in range(half_num - 1):\n num += 1\n \n case_num += ( math.ceil(N / num) - 1 )\n\n\nprint(case_num)'... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s556518284', 's908036964', 's093938459'] | [9084.0, 9164.0, 9024.0] | [24.0, 27.0, 281.0] | [130, 161, 142] |
p02548 | u645661835 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['from math import sqrt\n\n# Function to return count of Ordered pairs\n# whose product are less than N\ndef countOrderedPairs(N):\n # Initialize count to 0\n count_pairs = int(0)\n\n # count total pairs\n p = int(sqrt(N - 1)) # + 1\n q = N\n \n for i in range(1, p, 1):\n for j in range(i, ... | ['Wrong Answer', 'Accepted'] | ['s255869941', 's173551918'] | [9188.0, 9012.0] | [563.0, 686.0] | [780, 778] |
p02548 | u687332123 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=int(input())\nval=n\nfor i in range(2,n):\n val+=n//i\nprint(val+1)', 'k=int(input())\nn=k-1\nval=n\nif k==2:\n print(1)\nelse:\n for i in range(2,n):\n val+=n//i\n print(val+1)'] | ['Wrong Answer', 'Accepted'] | ['s558506668', 's063164384'] | [9072.0, 9156.0] | [141.0, 141.0] | [68, 114] |
p02548 | u694536861 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\ncount = 0\n\nfor a in range(1, N+1):\n tmp = (N-1) // a\n if a == tmp:\n count += 1\n if a < N // 2:\n count += tmp\n else:\n count += 1 \n\nprint(count-1)', 'N = int(input())\ncount = 0\n\nfor a in range(1, N):\n tmp = (N-1) // a\n if a < (N) // 2:\n count += tmp\n else:... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s224706862', 's483419737', 's937628502'] | [9168.0, 9104.0, 9164.0] | [274.0, 239.0, 241.0] | [183, 151, 152] |
p02548 | u699944218 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\n\nans = 0\n\nfor a in range(1, N + 1):\n for b in range(1, N // a):\n if a * b <= N:\n ans += 1\n\nprint(ans)', 'N = int(input())\n\nans = 0\n\nfor a in range(1, N + 1):\n for b in range(1, N + 1):\n if a * b <= N:\n ans += 1\n\nprint(ans)', 'n = int(input())\nans = 0\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009921136', 's284239699', 's500212045'] | [9104.0, 8996.0, 9164.0] | [2075.0, 2206.0, 165.0] | [133, 132, 79] |
p02548 | u723345499 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\n\ncnt = 0\nfor r in range(1, n):\n for a in range(1, (a // 2) +1):\n if r % a == 0:\n cnt += 1\nprint(cnt)', '\ncnt = 0\nfor a in range(1, n):\n cnt +=(n -1)// a\nprint(cnt)', 'n = int(input())\n\ncnt = 0\nfor a in range(1, n):\n cnt +=(n -1)// a\nprint(cnt)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s512478942', 's637843751', 's582724775'] | [9132.0, 8980.0, 9060.0] | [28.0, 25.0, 151.0] | [138, 62, 79] |
p02548 | u728910348 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['def make_divisors(n):\n lower_divisors , upper_divisors = [], []\n i = 1\n while i*i <= n:\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n upper_divisors.append(n//i)\n i += 1\n return lower_divisors + upper_divisors[::-1]\n\nn = int(input... | ['Wrong Answer', 'Accepted'] | ['s517240926', 's567037246'] | [9164.0, 9064.0] | [2206.0, 497.0] | [398, 178] |
p02548 | u742260762 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N =int(input())\nc = 0\nfor i in range(N):\n c += n-1//i+1\nprint(c) \n \n', 'N =int(input())\nc = 0\nfor i in range(N):\n c += N-1//i+1\nprint(c) \n \n', 'N =int(input())\nc = 0\nfor i in range(N):\n c += (N-1)//(i+1)\nprint(c) \n \n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s475072419', 's983679072', 's150613344'] | [8952.0, 9136.0, 8988.0] | [31.0, 28.0, 173.0] | [72, 72, 76] |
p02548 | u751717561 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\n\nans = 0\n\nprint((n-1)+len(range(n**(1/2))))', 'n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) // a\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s470999844', 's421936939'] | [9416.0, 9160.0] | [30.0, 160.0] | [60, 79] |
p02548 | u777800738 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import numpy as np\nnum=int(input())-1\nm=np.outer([a+1 for a in range(num)],[a+1 for a in range(num)])\nprint(m)\nm=np.where(m<=num,1,0)\nprint(np.sum(m))', 'import numpy as np\nnum=int(input())\ncount=0\nfor a in range(num-1):\n tmp=int(num/(a+1))\n if num%(a+1)==0:\n count+=tmp-1\n else:\n count+=tmp\npri... | ['Runtime Error', 'Accepted'] | ['s667483194', 's938006551'] | [3512828.0, 27140.0] | [2314.0, 458.0] | [150, 159] |
p02548 | u787866676 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N=int(input())\n#A,B,C>0 C=N-A*B\ncount=0\nfor A in range(1,N):\n for B in range(1,N):\n print(A,B,N-A*B)\n if N-(A*B)>0:\n count+=1\nprint(count)', 'N=int(input())\ncount=0\nfor A in range(1,N):\n count+=int((N-1)/A)\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s728415595', 's638474309'] | [45832.0, 9116.0] | [2816.0, 241.0] | [166, 80] |
p02548 | u802180430 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans = 0\nfor i in range(1,n-1):\n ans+= (n-1)//i\nprint(ans);\n ', 'n = int(input())\nans = 0\nif n == 1:\n print(0)\nelif n == 2:\n print(1)\nelse:\n for i in range(1,n-1):\n ans+= (n-1)//i\n print(ans); \n', 'N = int(input())\n \nresult = 0\nfor A in range(1, N + 1):\n result += (N - ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s509773750', 's924680008', 's742085430'] | [9132.0, 9144.0, 9080.0] | [156.0, 167.0, 154.0] | [79, 137, 96] |
p02548 | u872259176 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\ncount = 0\nfor c in range(n):\n ab = n - c\n if ab % a == 0:\n count += 1\nprint(count)', 'n = int(input())\ncount = 0\nfor c in range(n):\n\tab = n - c\n if ab % a = 0:\n count += 1\nprint(count)', 'n = int(input())\ncount = 0\nfor a in range(1,n):\n count += int((n-1)/a)\np... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s000453231', 's446183755', 's773998684', 's591830913'] | [9168.0, 9012.0, 9032.0, 9160.0] | [26.0, 24.0, 26.0, 154.0] | [112, 106, 172, 82] |
p02548 | u882564128 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\ncnt = 0\nfor a in range(1,n):\n cnt += (n-1)//a\nprint(cnt)n = int(input())\ncnt = 0\nfor a in range(1,n):\n cnt += (n-1)//a\nprint(cnt)', 'n = int(input())\ncnt = 0\nfor a in range(1,n):\n cnt += (n-1)//a\nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s239628550', 's221264716'] | [8956.0, 9132.0] | [29.0, 164.0] | [152, 76] |
p02548 | u889405092 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import sympy\nN=int(input())\ncount=0\nfor i in range(1,N)\n count=count+sympy.divisor_count(i)\nprint (count)', 'N=int(input())\na=1\ncount=0\nwhile a<N:\n count=count+(N-1)//a\n a=a+1\nelse:\n print(count)'] | ['Runtime Error', 'Accepted'] | ['s363349555', 's208158432'] | [9016.0, 9108.0] | [23.0, 194.0] | [106, 89] |
p02548 | u894858952 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nL=[0]*N\n\nfor i in range (1,N):\n L[i]=(N-1)//i\n #print(i)\n\nprint(L)\nans = sum(L)\nprint(ans)', 'N = int(input())\nL=[0]*N\n\nfor i in range (1,N):\n L[i]=(N-1)//i\n #print(i)\n\n#print(L)\nans = sum(L)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s593319633', 's613433795'] | [22796.0, 16560.0] | [237.0, 166.0] | [109, 110] |
p02548 | u919730120 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=int(input())\nans=0\nfor a in range(1,n-1):\n\tfor b in range(1,n-a):\n\t\tif n-a*b<=0:\n\t\t\tcontinue\n\t\telse:\n\t\t\tans=+=1\nprint(ans)', 'n=int(input())\nans=0\nfor a in range(1,n-1):\n\tfor b in range(1,n-a):\n\t\tif n-a*b<=0:\n\t\t\tcontinue\n\t\telse:\n\t\t\tans+=1\nprint(ans)', "def resolve():\n #n=in... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s196719924', 's433530934', 's520249242'] | [8972.0, 9160.0, 9192.0] | [24.0, 2206.0, 1001.0] | [124, 123, 473] |
p02548 | u932868243 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n=it(input())\nans=0\nfor i in range(1,n):\n ans+=int((n-1)/i)\nprint(ans)', 'n=int(input())\nans=0\nfor i in range(1,n):\n ans+=int((n-1)/i)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s563780366', 's949364910'] | [9028.0, 9000.0] | [26.0, 227.0] | [71, 72] |
p02548 | u941645670 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['#c\nimport sys\nn = int(input())\nimport math\n\nans = 0\nfor i in range(1,n):\n before = n\n for j in range(1,n):\n if before <= j:\n print(j)\n break\n if (n-i)%j==0 :\n \n \n if j==(n-i)/j:\n ans+=1\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s734658667', 's366093940'] | [9284.0, 9160.0] | [2206.0, 154.0] | [352, 104] |
p02548 | u945065638 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import itertools\nimport math\n\nn = int(input())\ns_n = math.floor(math.sqrt(n))\n\nans = 0\nz = 0\nl = []\n\n\nfor i in range(1,n):\n l.append(i) \n\nfor x in itertools.combinations(l, 2):\n if x[0] * x[1] < n:\n ans += 2\n\nfor y in range(1,s_n):\n if y ** 2 < n :\n ans+=1\n \n \np... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s242886045', 's325525138', 's580495622'] | [56496.0, 8960.0, 9156.0] | [2208.0, 28.0, 232.0] | [304, 109, 110] |
p02548 | u945405878 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\ncount = 0\nfor i in range(1, N):\n AB_product = N - i\n count += count_divisors(AB_product)\n\nprint(count)', '# A * B = N - C\nN = int(input())\ncount = 0\nfor i in range(1, N):\n AB = N - i\n count += len(make_divisors(AB))\n\nprint(count)', 'N = int(input())\n\nN_m1 = N - 1\ncounter ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s000991348', 's716230287', 's613860010'] | [9156.0, 9160.0, 9156.0] | [28.0, 26.0, 137.0] | [125, 130, 112] |
p02548 | u950754160 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ["N=int(input(''))\nC=0\nF=N-C\n\na=0\nk=0\nv=0\n\nwhile C<N-1:\n C=C+1\n while a<=F:\n a=a+1\n v=v+(F%a)\n if v==0:\n k=k+1\n v=0\n a=0\n F=N-C\nprint(k)\n", "N=int(input(''))\na=1\nk=0\nF=int(N**(1/2))\n\nwhile a<N:\n if N%a>0:\n b=N//a\n k=k+b\n b=0\n else:\n b=N//a... | ['Time Limit Exceeded', 'Accepted'] | ['s614902188', 's914282715'] | [9100.0, 9440.0] | [2206.0, 290.0] | [172, 150] |
p02548 | u956259660 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nt = 1\nfor tc in range(t):\n N = 1000005\n div = [0] * N\n for i in range(1,N):\n for j in range(i,N,i):\n div[j] += 1\n n = int(input())\n ans = 0\n for i in range(1,n):\n ans += div[n-c]\n print(ans)\n \n\n \n \n', 'import math\nt = 1\nfor tc i... | ['Runtime Error', 'Accepted'] | ['s553327335', 's970916111'] | [16652.0, 9128.0] | [1831.0, 183.0] | [269, 227] |
p02548 | u956318161 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) / a\nprint(ans)', 'n = int(input())\nans = 0\nfor a in range(1, n):\n ans += (n - 1) // a\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s354451619', 's056116369'] | [9104.0, 9056.0] | [155.0, 152.0] | [78, 79] |
p02548 | u962330718 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N=int(input())\nans=0\nfor i in range(1,int(N**(1/2))+1):\n a=N//i\n ans+=(a-i)*2+1\nprint(ans)', 'N=int(input())\nans=0\nfor i in range(1,int(N**(1/2))+1):\n a=(N-1)//i\n ans+=(a-i)*2+1\nif int(N**(1/2))**2==N:\n ans+=1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s242905199', 's397533788'] | [9420.0, 9412.0] | [34.0, 31.0] | [96, 135] |
p02548 | u966648240 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N=int(input())\nans=0\n\nfor i in range(1,10**6):\n for j in range(1,(10**6)//i+1):\n if N > i*j:\n ans += 1\n\nprint(ans)', 'N=int(input())\nans=0\n\nfor i in range(1,10**6):\n for j in range(i,10**6//i+1):\n if N > i*j:\n if i==j:\n ans += 1\n else:\n ans += 2\n\nprint(ans)'] | ['Time Limit Exceeded', 'Accepted'] | ['s096756549', 's737933864'] | [9168.0, 9076.0] | [2205.0, 1506.0] | [123, 167] |
p02548 | u972991614 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['N = int(input())\nfor i in range(1,n):\n ans += (n-1) // i\nprint(ans)', 'N = int(input())\nans = 0\nfor i in range(1,n):\n ans += (n-1) // i\nprint(ans)', 'def factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n whil... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s284934186', 's419387104', 's477668615', 's340570113'] | [9132.0, 9084.0, 9452.0, 9052.0] | [24.0, 29.0, 29.0, 154.0] | [70, 78, 431, 80] |
p02548 | u982030663 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['import math\nN = int(input())\nresult = 0\nfor i in range(1, N + 1):\n s = math.ceil(N / i)\n for j in range(1, s + 1):\n a = N - i * j\n if a > 0:\n result = result + 1\nprint(s, result)\n', 'N = int(input())\nresult = 0\nfor i in range(1, N + 1):\n s = int(N / i) + 1\n for j in ... | ['Wrong Answer', 'Accepted'] | ['s283883703', 's098885075'] | [9156.0, 9164.0] | [2205.0, 762.0] | [210, 201] |
p02548 | u995163736 | 2,000 | 1,048,576 | Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? | ['n = int(input())\n\nans = 0\nfor a in range(1,int(n**(1/2))):\n tmp = 0\n if n%a == 0:\n tmp += ((n//a)-1-a)*2\n tmp += 1\n else:\n tmp += (n//a-a)*2\n tmp += 1\n #print(tmp)\n ans += tmp\nprint(ans)\n\n', 'n = int(input())\n\nans = 0\nfor a in range(1,int(n**(1/2)+1)):\n tmp = 0\n if (a**2) == n:\... | ['Wrong Answer', 'Accepted'] | ['s466495701', 's908780029'] | [9436.0, 9444.0] | [29.0, 26.0] | [205, 254] |
p02549 | u145145077 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['n,k=map(int,input().split())\nlr=[list(map(int,input().split())) for _ in range(k)]\n\nmod = 998244353\n\ndp = [0] * (n+1)\nsdp = [0] * (n+1)\ndp[1] = 1\nsdp[1] = 1\n\nfor i in range(n+1):\n for j in range(k):\n left = max(0, i-lr[j][1])\n right = max(0, i-lr[j][0]+1)\n \n dp[i] += sdp[right] - sdp[left]... | ['Runtime Error', 'Accepted'] | ['s170600462', 's962418813'] | [26028.0, 26200.0] | [1480.0, 1402.0] | [371, 374] |
p02549 | u151785909 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['n , k = map(int, input().split())\n\nli = [0]*(n+2)\nlis = []\nlr=[]\nlis2 =[0]*(3*n)\nlis2[1]=1\n\nfor i in range(k):\n l,r = map(int, input().split())\n lr.append((l,r))\n\nfor i in range(1,n+1):\n lis2[i]+=lis2[i-1]\n lis2[i]%=998244353\n for j,k in lr:\n lis2[i+j]+=lis2[i]\n lis2[i+k+... | ['Wrong Answer', 'Accepted'] | ['s364332241', 's670593727'] | [36956.0, 27444.0] | [877.0, 824.0] | [386, 351] |
p02549 | u152741807 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['n,k = (int(x) for x in input().split())\nlr = []\nfor _ in range(k):\n l,r = (int(x) for x in input().split())\n lr.append((l,r))\nlr.sort()\nprint(lr)\n\nmod = 998244353\n\ndp= [0]*(n+1)\ndp[1] = 1\n\nfor i in range(2,n+1):\n cnt = 0\n for l,r in lr:\n if l >= i:\n break\n else:\... | ['Wrong Answer', 'Accepted'] | ['s840681643', 's379405466'] | [16812.0, 16948.0] | [648.0, 645.0] | [395, 385] |
p02549 | u190616335 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['#!/usr/bin/python3\n# -*- coding: utf-8 -*-\nimport numpy as np\nn, k = map(int, input().split())\ns_list = []\na_list = np.zeros((n + 1), dtype=int)\na_list[1] = 1\nfor i in range(k):\n l, r = map(int, input().split())\n s_list.append([l, r + 1])\n\nfor i in range(1, n):\n if a_list[i] > 998244353:\n ... | ['Wrong Answer', 'Accepted'] | ['s331162519', 's883431859'] | [28396.0, 24800.0] | [2206.0, 1233.0] | [610, 485] |
p02549 | u326609687 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['import sys\nif sys.argv[-1] == \'ONLINE_JUDGE\':\n import os\n import re\n with open(__file__) as f:\n source = f.read().split(\'\n for s in source[1:]:\n s = re.sub("\'\'\'.*", \'\', s)\n sp = s.split(maxsplit=1)\n if os.path.dirname(sp[0]):\n os.makedirs(os.path.di... | ['Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s106833394', 's802073318', 's373277049'] | [27324.0, 32940.0, 24596.0] | [109.0, 2206.0, 366.0] | [1780, 1773, 611] |
p02549 | u344276999 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['N,K = [int(i) for i in input().split()]\nmod = 998244353\nLR = []\nS = []\ndp = [0]*(N+1)\nfor i in range(K):\n LR.append([int(i) for i in input().split()])\nfor i in range(N):\n for lr in LR:\n if lr[0] <= i and i <= lr[1]:\n S.append(i)\nS = list(set(S))\n#print(S)\n\nfor i in range(1,N):\n if i in S:\n ... | ['Wrong Answer', 'Accepted'] | ['s084324938', 's492117910'] | [36868.0, 27848.0] | [2238.0, 920.0] | [456, 444] |
p02549 | u391725895 | 2,000 | 1,048,576 | There are N cells arranged in a row, numbered 1, 2, \ldots, N from left to right. Tak lives in these cells and is currently on Cell 1. He is trying to reach Cell N by using the procedure described below. You are given an integer K that is less than or equal to 10, and K non- intersecting segments [L_1, R_1], [L_2, R_... | ['import numpy as np\n\nN, K = map(int, input().split())\n\nD = []\n\nfor _ in range(K):\n L, R = map(int, input().split())\n\n for i in range(L, R+1):\n D.append(i)\n\nD.sort()\n\ndp = np.zeros(300000)\ndp[1] = 1\n\nfor d in D:\n for i in range(1, N//d)\n dp += np.roll(dp, i * d)\n dp %= 9982... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s292175821', 's695421015', 's587047114'] | [9016.0, 41660.0, 29408.0] | [28.0, 2207.0, 1474.0] | [322, 323, 426] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.