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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03239 | u669770658 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["import collections\n\nn, T = map(int, input().split())\n\ninput_dict = collections.OrderedDict()\n\nfor _ in range(n):\n a, b = list(map(int, input().split()))\n input_dict[a] = b\n\nt = min([value for key, value in input_dict.items() if key <= T])\n\nans = [i for i, x in enumerate(input_dict.values()) if x == ... | ['Runtime Error', 'Accepted'] | ['s799709587', 's493026252'] | [3316.0, 3060.0] | [21.0, 19.0] | [393, 312] |
p03239 | u677312543 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N, T = map(int, input().split())\n\nans 1003\nfor _ in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\n\nprint('TLE' if ans==1003 else ans)\n", "n, T = map(int, input().split())\nans = 1003\nfor _ in range(n):\n c, t = map(int, input().split())\n if t <= T:\n ... | ['Runtime Error', 'Accepted'] | ['s081777643', 's629101128'] | [2940.0, 2940.0] | [17.0, 18.0] | [177, 179] |
p03239 | u682467216 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n,T = map(int, input().split())\ni = 1001\n \nfor _ in range(N):\n c, t = map(int, input().split())\n if t <= T:\n i = min(i, c)\n\nif i == 1001:\n print('TLE')\nelse:\n print(i)", "N, T = map(int, input().split())\ni = 1001\n \nfor _ in range(N):\n c, t = map(int, input().split())\n if t <= T:\n i = min(... | ['Runtime Error', 'Accepted'] | ['s758738250', 's464627871'] | [2940.0, 2940.0] | [20.0, 17.0] | [174, 175] |
p03239 | u686036872 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N, T = map(int, input().split())\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n x=min(c, 1001)\nprint('TLE' if x=1001 else c)", "N, T = map(int, input().split())\nz=1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n min=(c, z)\nprint('TLE' if min=1001 else c)", "N,... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s189259366', 's201977712', 's524531675', 's550809658', 's559501576', 's743890909', 's844671400', 's572120474'] | [2940.0, 2940.0, 3316.0, 2940.0, 2940.0, 3316.0, 2940.0, 2940.0] | [17.0, 17.0, 21.0, 18.0, 17.0, 20.0, 17.0, 17.0] | [146, 151, 140, 140, 147, 149, 150, 201] |
p03239 | u691896522 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n, t = list(map(int, input().split()))\ndata = []\nfor i in range(n):\n data.append(list(map(int, input().split())))\nminCost = 1001\nfor i in range(n):\n if data[i][1] <= t && minCost > data[i][0]:\n minCost = data[i][0]\n\nif minCost == 1001:\n print("TLE")\nelse:\n print(minCost)', 'n, t = list(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s836341860', 's840489770', 's668171865'] | [2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [290, 258, 291] |
p03239 | u693933222 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['Base = input().split(" ")\nN = int(Base[0])\nTL = int(Base[1])\nTX = 10000\n\nfor i in range(N):\n Roi = input().split(" ")\n Coi = int(Roi[0])\n TLi = int(Roi[1])\n if TL >= TLi:\n if TX >= int(Coi) or i ==0:\n TX = Coi\nif TX == 10000:\n print("TLE")\nelif:\n print(TX)', 'Base = ... | ['Runtime Error', 'Accepted'] | ['s328120690', 's356891195'] | [2940.0, 3064.0] | [17.0, 17.0] | [292, 292] |
p03239 | u698416089 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['nt = input().split()\nct = ["0"]\nfor i in range(int(nt[0])):\n inp = input().split()\n if int(inp[1]) <= int(nt[1]):\n ct.append(inp[0])\nprint(ct)\nct.sort()\nprint(ct)\nif len(ct) == 1:\n print("TLE")\nelse:\n print(ct[1])\n', 'nt = input().split()\nct = [0]\nfor i in range(int(nt[0])):\n inp... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s268010431', 's527385310', 's545092930', 's916288824', 's519989250'] | [3060.0, 3064.0, 3060.0, 3064.0, 3060.0] | [18.0, 18.0, 17.0, 18.0, 18.0] | [233, 235, 228, 232, 215] |
p03239 | u699944218 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T = list(map(int,input().split()))\nc = [None for _ in range(N)]\nt = [None for _ in range(N)]\nA = [None for _ in range(N)]\nfor i in range(N):\n c[i], t[i] = input().split()\n c[i] = int(c[i])\n t[i] = int(t[i])\nfor i in range(N):\n if t[i] <= T:\n A[i] = c[i]\nA = [a for a in A if type(a) != 'Nonetype']\... | ['Runtime Error', 'Accepted'] | ['s046202050', 's897409611'] | [3064.0, 3064.0] | [27.0, 17.0] | [342, 320] |
p03239 | u702208001 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n, limit = map(int, input().split())\ncost = list()\nfor _ in range(n):\n c, time = [int(a) for a in input().split()]\n if time <= limit:\n cost.append(c)\nprint(max(cost) if len(cost) > 0 else 'TLE')\n", 'n, limit = map(int, input().split())\ncost = list()\nfor _ in range(n):\n c, time = [int(a) for a in input... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s171782185', 's443863108', 's675613438'] | [2940.0, 2940.0, 3064.0] | [19.0, 18.0, 18.0] | [200, 171, 200] |
p03239 | u708255304 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["import sys\nN, T = map(int, sys.stdin.readline().strip().split()) \n\ncost = 1001\nfor line in sys.stdin.readlines():\n c, t = line.strip().split()\n if T >= t:\n cost = min(cost, c)\n\nif cost == 1001:\n print('TLE')\nelse:\n print(cost)\n", "import sys\nN, T = map(int, sys.stdin.readline().strip... | ['Runtime Error', 'Accepted'] | ['s756451792', 's573537252'] | [2940.0, 2940.0] | [17.0, 17.0] | [286, 296] |
p03239 | u711539583 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n, t = map(int, input().split())\nk = [list(map(int, input().split())) for _ in range(n)]\na = [item[0] for item in k if item[1] <= t]\nif k:\n print(min(k))\nelse:\n print("TLE")', 'n, t = map(int, input().split())\nk = [list(map(int, input().split())) for _ in range(n)]\na = [item[0] for item in k if item[1] <= t... | ['Wrong Answer', 'Accepted'] | ['s956712235', 's919470729'] | [3060.0, 3060.0] | [17.0, 17.0] | [175, 175] |
p03239 | u716530146 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T=map(int,input().split())\nct=[tuple(map(int,input().split())) for i in range(n)]\nans=10**9\nfor c,t in ct:\n if T<t:\n continue\n else:\n ans=min(ans,c)\nprint(ans if ans!=10**9 else 'TLE')\n", "N,T=map(int,input().split())\nct=[tuple(map(int,input().split())) for i in range(N)]\nans=10**9\nf... | ['Runtime Error', 'Accepted'] | ['s819458992', 's748269241'] | [2940.0, 2940.0] | [18.0, 17.0] | [207, 207] |
p03239 | u721316601 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["import numpy as np\n\nN, T = list(map(int, input().split()))\n\ns = np.array([])\n\nfor i in range(N):\n s = np.append(s, np.array(list(map(int, input().split()))))\n\ns = s.reshape((N, 2))\n\npos = np.where(s[:, 1] <= T)\n\nif pos[0].shape == (0,):\n print('TLE')\nelse:\n np.sort(s[pos], axis=0)\n print(... | ['Wrong Answer', 'Accepted'] | ['s160249401', 's037579593'] | [18732.0, 3064.0] | [1244.0, 18.0] | [314, 226] |
p03239 | u729133443 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["i=lambda:map(int,input().split());N,T=i();print(min([0]+[c for c,t in[i()for _ in[0]*N]if t<=T])or'TLE')", "i=lambda:map(int,input().split());N,T=i();print(min([c for c,t in eval('i(),'*N)if t<=T]or['TLE']))"] | ['Wrong Answer', 'Accepted'] | ['s993045428', 's214490193'] | [3060.0, 3060.0] | [18.0, 19.0] | [104, 99] |
p03239 | u731702557 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N, T = map(int, input().split())\nc = []\nt = []\n\nfor i in range(N):\n box = [0,0]\n box[0], box[1] = map(int, input().split())\n c.append(box[0])\n t.append(box[1])\n\ncost = 1000\ncheck = -1\n\nfor i in range(N):\n if t[i] <=T and c[i] <= cost:\n check = i\n cost = c[i]\n #prin... | ['Runtime Error', 'Accepted'] | ['s281929438', 's831222550'] | [3064.0, 3064.0] | [17.0, 18.0] | [382, 381] |
p03239 | u732870425 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n, t = map(int, input())\nct = [map(int(input())) for _ in range(n)]\n\nli = []\nfor i in range(n):\n if ct[i][1] < t:\n li.append(ct[i])\n else:\n continue\n\nif count(li) > 0:\n print(min(li[:][0]))\nelse:\n print("TLE")', 'n, t = map(int, input().split())\nct = [list(map(int,input().split())) for _ in ra... | ['Runtime Error', 'Accepted'] | ['s532386418', 's123201715'] | [3060.0, 3060.0] | [17.0, 18.0] | [219, 238] |
p03239 | u736729525 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = [int(x) for x in input().strip()]\n\nok = 2000\nfor _ in range(N):\n c, t = [int(x) for x in input().strip()]\n if t <= T:\n ok = min(ok, c)\n\nprint("TLE" if ok == 2000 else ok)\n', 'N, T = [int(x) for x in input().split()]\n\nok = 2000\nfor _ in range(N):\n c, t = [int(x) for x in input().split()]\n i... | ['Runtime Error', 'Accepted'] | ['s003708997', 's614026652'] | [2940.0, 2940.0] | [17.0, 17.0] | [183, 183] |
p03239 | u748377775 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['def input_N_T():\n N_T=input().split()\n int_N_T=list(map(int,N_T))\n N=int_N_T[0]\n T=int_N_T[1]\n return [N,T]\n\nN,T=input_N_T()\n\nmin_c,min_t=1001,1001\n\nfor i in range(N):\n c,t=input_N_T()\n if(t<=T and min(min_c,c)==c):\n min_c,min_t=c,t\n\nif(N==1001 and T==1001):\n print("TLE... | ['Runtime Error', 'Accepted'] | ['s913106093', 's137089881'] | [2940.0, 3060.0] | [18.0, 18.0] | [323, 315] |
p03239 | u754553095 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['a=[]\nb=1000\nn,t=map(int,input().split(" "))\nfor _ in range(n):\n a.append(tuple(map(int,input().split(" "))))\nfor i in range(n):\n if t>=a[i][1]:\n if b>a[i][0]:\n b=a[i][0]\nif b !=1000:\n print(b)\nif b==1000\n print("TLE")', 'a=[]\nb=1000\nn,t=map(int,input().split(" "))\nfor _ in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s475971330', 's781413767', 's986687171'] | [2940.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [247, 246, 242] |
p03239 | u757030836 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t = map(int,input().split())\n\nct = [[int(i) for i in input().split()] for _ in range(n)]\n\nx=[]\nfor i in range(n):\n if ct[i][1] <= t:\n x.append(ct[i][0])\n \n \nx.sotr()\n\nprint(x[0])', 'n,t = map(int,input().split())\n\nct = [[int(i) for i in input().split()] for _ in range(n)]\n\nx=[]\nfor i in r... | ['Runtime Error', 'Accepted'] | ['s635249900', 's469526122'] | [3060.0, 3060.0] | [18.0, 17.0] | [190, 231] |
p03239 | u777028980 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T=map(int, input().split())\nans=9999\nfor i inrange(N):\n A,B=map(int, input().split())\n if (T>B):\n if(ans>A):\n ans=A\nif(ans==9999):\n print("TLE")\nelse:\n print(ans)', 'N,T=map(int, input().split())\nans=9999\nfor i in range(N):\n A,B=map(int, input().split())\n if (T>=B):\n if(ans>=A):\n ... | ['Runtime Error', 'Accepted'] | ['s740935058', 's116357365'] | [2940.0, 3060.0] | [17.0, 18.0] | [176, 179] |
p03239 | u778700306 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['\nn,t=map(int,input().split())\n\nres=None\n\nfor _ in range(n):\n c,u=map(int,input().split())\n if u <= t:\n res = min(res,u) if res else u\n\nprint(res if res else "TLE")', '\nn,t=map(int,input().split())\n\nres=None\n\nfor _ in range(n):\n c,u=map(int,input().split())\n if u <= t:\n res ... | ['Wrong Answer', 'Accepted'] | ['s733828999', 's939110537'] | [2940.0, 2940.0] | [19.0, 17.0] | [176, 176] |
p03239 | u779728630 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\nc = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\nprint(ans) if c < 1001 else print("TLE")', 'N, T = map(int, input().split())\nans = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)... | ['Runtime Error', 'Accepted'] | ['s796842378', 's394975423'] | [9188.0, 9160.0] | [27.0, 26.0] | [171, 176] |
p03239 | u784022244 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T=map(int, input().split())\nans=10**9\nfor i in range(N):\n c,t=map(int, input().split())\n if t<=T:\n ans=min(ans,c)\nif ans=10**9:\n print("TLE")\nelse:\n print(ans)', 'N,T=map(int, input().split())\nans=10**9\nfor i in range(N):\n c,t=map(int, input().split())\n if t<=T:\n ans=min(ans,c)\nif ans==10... | ['Runtime Error', 'Accepted'] | ['s764234680', 's946950660'] | [2940.0, 2940.0] | [17.0, 17.0] | [168, 169] |
p03239 | u785578220 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['print("TLE")', 'n,w = map(int,input().split())\nm = 1001\nfor i in range(n):\n a,b = map(int,input().split())\n if b <= w and a < m:\n m = a\nif m == 1001:\n print("TLE")\nelse:\n print(m)\n '] | ['Wrong Answer', 'Accepted'] | ['s425456252', 's871743251'] | [2940.0, 2940.0] | [18.0, 18.0] | [12, 187] |
p03239 | u787562674 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N, T = map(int, input().split())\n\nans = 10 ** 9\n\nfor _ in rnage(N):\n a, b = map(int, input().split())\n if b <= T:\n ans = min(ans, b)\n\nif ans == 10 ** 9:\n print('TLE')\nelse:\n print(ans)", "N, T = map(int, input().split())\n\nans = 10 ** 9\n\nfor _ in range(N):\n a, b = map(int, input(... | ['Runtime Error', 'Accepted'] | ['s576856655', 's258078491'] | [2940.0, 2940.0] | [17.0, 18.0] | [203, 203] |
p03239 | u790301364 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['\ndef main04():\n buf = input("");\n bufs = buf.split(" ");\n val1 = [];\n for i in range(len(bufs)):\n val1.append(int(bufs[i]));\n val2 = [];\n for i in range(val1[0]):\n buf = input("");\n bufs = buf.split(" ");\n kari = [];\n kari.append(int(bufs[0]));\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s046444923', 's353585626', 's004125872'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [608, 607, 612] |
p03239 | u796942881 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\n\nct = [int(j) for j in input().split() for i in range(H)]\n\nct.sort(key=lambda x: x[0])\n\nans = 1001\n\nfor i in range(N):\n if ct[i][1] <= T:\n ans = ct[i][0]\n break\n\nprint("TLE" if ans == 1001 else ans)\n', 'N, T = map(int, input().split())\n\nct = [[int(j) f... | ['Runtime Error', 'Accepted'] | ['s546079258', 's195109278'] | [3060.0, 3060.0] | [17.0, 18.0] | [249, 251] |
p03239 | u798316285 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t=map(int,input().split())\ncost_list=[]\nfor i in range(n):\n cost,time=map(int,input().split())\n if time<=t:\n cost_list+=cost\nif cost_list=![]:\n print(min(cost_list))\nelse:\n print(TLE)', 'n,t=map(int,input().split())\ncost_list=[]\nfor i in range(n):\n cost,time=map(int,input().split())\n if time<=... | ['Runtime Error', 'Accepted'] | ['s365924834', 's277014192'] | [2940.0, 2940.0] | [17.0, 17.0] | [192, 196] |
p03239 | u810735437 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["\nN, T = map(int, input().split())\nans = 1e9\nfor n in range(T):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\nif ans == 1e9:\n print('TLE')\nelse:\n print(ans)\n\n", "N, T = map(int, input().split())\nans = 1e9\nfor n in range(N):\n c, t = map(int, input().split())\n ... | ['Runtime Error', 'Accepted'] | ['s198096491', 's541489727'] | [3316.0, 3316.0] | [21.0, 23.0] | [195, 194] |
p03239 | u811576279 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['#-*- coding:utf-8 -*- \n\ndef main():\n\tN, T = map(int,input().split())\n\tc_list = []\n\tt_list = []\n\tfor i in range(N):\n\t\tc, t = map(int,input().split())\n\t\tc_list.append(c)\n\t\tt_list.append(t)\n\t\n\tindex_list = []\n\tfor i in range(N):\n\t\tif t_list[i] < T:\n\t\t\tindex_list.append(i)\n\t\n\t#print(in... | ['Wrong Answer', 'Accepted'] | ['s061907072', 's043457461'] | [3064.0, 3064.0] | [17.0, 17.0] | [515, 555] |
p03239 | u812576525 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T = list(map(int,input().split()))\nC = [list(map(int,input().split())) for i in range(N)]\nC = sorted(C, key = lambda x : x[1],reverse =False)\n\nA =[0]\nfor i in C:\n if i[1] < T:\n A.append(i[0])\n\nprint(min(A) if min(A) != 0 else "TLE")', 'N,T = list(map(int,input().split()))\nC = [list(map(int,input... | ['Wrong Answer', 'Accepted'] | ['s295016278', 's633058876'] | [3060.0, 3060.0] | [17.0, 17.0] | [244, 261] |
p03239 | u813371068 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T = map(int,input().split())\nt = 1001\nfor i in range(N) :\n c,t = map( int, input().split() )\n if t<=T:\n m = min(m,c)\n print('TLF' if m==1001 else m)", "N,T = map(int,input().split())\nm = 1001\nfor i in range(N) :\n c,t = map( int, input().split() )\n if t<=T:\n m = min(m,c)\n ... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s284433075', 's433335440', 's773378908', 's885818161', 's068536598'] | [3060.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0, 18.0, 18.0] | [166, 166, 166, 166, 162] |
p03239 | u814781830 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\nct = [list(map(int, input().split())) for _ in range(N)]\nret = 10 ** 9\nfor c, t in ct:\n\tif t <= T:\n\t\tret = min(ret, c)\nif ret > 10 ** 9:\n\tprint(ret)\nelse:\n\tprint("TLE")', 'N, T = map(int, input().split())\nct = [list(map(int, input().split())) for _ in range(N)]\nret = 1... | ['Wrong Answer', 'Accepted'] | ['s478370228', 's276736829'] | [3060.0, 3060.0] | [18.0, 18.0] | [201, 201] |
p03239 | u814986259 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T=map(int,input().split())\nct = [[0,0] for i in range N]\nfor i in range(N):\n ct[i]=list(map(int,input().split()))\nct.append([-1,T])\nct.sort(reverse=True,key=lambda x:x[1])\nindex = ct.index([-1,T])\nif index==0:\n print("TLE")\nelse:\n ans = sorted(ct[:index],key=lambda x:x[0])\n print(ans[0][0])', 'N,T=ma... | ['Runtime Error', 'Accepted'] | ['s246416189', 's749843309'] | [2940.0, 3064.0] | [17.0, 18.0] | [297, 285] |
p03239 | u816631826 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n,t=map(int,input().split())\ncost,time=zip(*list(map(int,input().split()) for i in range(n)))\nans='TLE'\nc=list(cost)\nti=list(time)\nfor i in range(n):\n sc=min(c)\n if ti[c.index(sc)]<=t:\n ans=sc\n break\n else:\n c.pop(c.index(sc))\n\n\n\nprint(ans)", 'N , T = map(int, input().spli... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s483359033', 's559299163', 's785294673', 's010226842'] | [3064.0, 3060.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 18.0] | [270, 209, 270, 492] |
p03239 | u822662438 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t = map(int, input().split())\nli =[]\nfor i in range(n):\n li.append(list(map(int, input().split())))\nprint(li)\n\na =[]\nfor i in range(n):\n if li[i][1] <= t:\n a.append(i)\nprint(a)\nb = []\nfor i in a:\n b.append(li[i][0])\nprint(b)\nif b:\n print(min(b))\nelse:\n print("TLE")\n', 'n,t =... | ['Wrong Answer', 'Accepted'] | ['s830785363', 's568740359'] | [3064.0, 3060.0] | [17.0, 18.0] | [290, 293] |
p03239 | u841568901 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(N)]\nY = [X[i] if X[i][1]<=T for i in range(N)]\nprint(Y)', 'N, T = map(int, input().split())\nX = [list(map(int, input().split())) for _ in range(N)]\nY = [x for x in X if x[1]<=T]\nZ = [y[0] for y in Y]\nprint("TLE" if Y==[] else ... | ['Runtime Error', 'Accepted'] | ['s880038514', 's543053624'] | [8880.0, 9192.0] | [28.0, 30.0] | [140, 174] |
p03239 | u843932857 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n,t = int(input().split())\nm = 10000\nfor i in range(n):\n c,d = int(input().split())\n if d <= t:\n if m > c:\n m = c\nif m = 10000:\n print('TLE')\nelse:\n print(m)", "n,t = map(int,input().split())\nm = 10000\nfor i in range(n):\n c,d = map(int,input().split())\n if d <= t:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s487440599', 's560865752', 's851963621', 's084874725'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0] | [187, 195, 197, 196] |
p03239 | u845847173 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\nc, t = list(map(int, input().split()))\nans = 1001\nfor i in range(N):\n if T > t and c < ans:\n ans = c\n\nif ans == 1000:\n print("TLE")\nelse:\n print(ans)', 'N, T = map(int, input().split())\nc, t = map(int, input().split())\nans = 1001\nfor i in range(N):\n if... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s022888834', 's041037538', 's668523838', 's897895576', 's250268599'] | [2940.0, 2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0, 18.0, 17.0] | [198, 192, 204, 204, 203] |
p03239 | u846150137 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["I=lambda:map(int,input())\nn,k=I()\ns=1001\nfor i in range(n):\n a,b=I()\n if b<=k:\n s=min(s,a)\nif s==1001:\n print('TLE')\nelse:\n print(s)", "I=lambda:map(int,input().split())\nn,k=I()\ns=1001\nfor i in range(n):\n a,b=I()\n if b<=k:\n s=min(s,a)\nif s==1001:\n print('TLE')\nelse:\n print(s)"] | ['Runtime Error', 'Accepted'] | ['s223780501', 's331412169'] | [2940.0, 2940.0] | [17.0, 17.0] | [139, 147] |
p03239 | u857148155 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t=[int(s)for s in input().split()]\ncost=[]\nfor _ in range(n):\n c,ti=[int(s)for s in input().split()]\n if ti<t:cost.append(c)\nif len(cost)==0:print("TLE")\nelse:\n cs=cost.sorted()\n print(cs[0])', 'n,t=[int(s)for s in input().split()]\ncost=[]\nfor _ in range(n):\n c,ti=[int(s)for s in input().split()]\n ... | ['Runtime Error', 'Accepted'] | ['s220441962', 's890904088'] | [3060.0, 3060.0] | [17.0, 17.0] | [197, 197] |
p03239 | u859897687 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n,a=map(int,input().split())\nans=100000000\nfor i in range(n):\n c,t=map(int,input().split())\n if t<=a:\n ans=min(ans,c)\nif ans=100000000\n print('TLE')\nelse:\n print(ans)\n", "n,a=map(int,input().split())\nans=100000000\nfor i in range(n):\n c,t=map(int,input().split())\n if t<=a:\n ans=min(ans,c)\ni... | ['Runtime Error', 'Accepted'] | ['s092119514', 's106594128'] | [2940.0, 2940.0] | [18.0, 17.0] | [174, 176] |
p03239 | u863370423 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["def main():\n line = input()\n n, T = [int(x) for x in line.split()]\n lista_tempos = []\n lista_custos = []\n for i in range(n):\n line = input()\n c, t = [int(x) for x in line.split()]\n if t <= T:\n lista_tempos.append(t)\n lista_custos.append(c)\n if li... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s442331951', 's633704311', 's731257787', 's344872830'] | [3064.0, 3060.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [382, 224, 216, 277] |
p03239 | u863397945 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,lim = map(int,input().split())\n\nans = 10000\n\nfor i in range(n):\n cost,time = map(int,input().split())\n \n if time <= lim and cost < ans:\n ans = cost\n\nif ans != 10000:\n print("TLE")\nelse:\n print(ans)', 'n,lim = map(int,input().split())\n\nans = 10000\n\nfor i in range(n):\n cost,... | ['Wrong Answer', 'Accepted'] | ['s738143843', 's359542672'] | [9052.0, 9172.0] | [29.0, 32.0] | [221, 221] |
p03239 | u865413330 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n, t = map(int, input().split())\nl = [input().split() for i in range(n)]\nl.sort()\nexist = False\n\nfor i in l:\n if int(i[1]) < t:\n print(i[0])\n exist = True\n break\nif !(exist):\n print("TLE")', 'n, t = map(int, input().split())\nl = [list(map(int, input().split())) for i in range(n)]\nl.sort()\nexi... | ['Runtime Error', 'Accepted'] | ['s160323763', 's812370637'] | [2940.0, 3060.0] | [17.0, 17.0] | [199, 217] |
p03239 | u886112691 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N=int(input())\nT=int(input())\ncheck=1\nansc=1001\n\nfor i in range(N):\n c=int(input())\n t=int(input())\n\n if t<T and c<ansc:\n ansc=c\n T=t\n check=0\n\nif check==0:\n print(ansc)\nelse:\n print('TLE')", "N,T=map(int,input().split())\n\nC=[]\n\nfor i in range(N):\n c,t=map(... | ['Runtime Error', 'Accepted'] | ['s991942966', 's270788284'] | [3060.0, 2940.0] | [17.0, 18.0] | [225, 173] |
p03239 | u895730552 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['\nn,t = (int(x) for x in input().split())\n\nA = []\nfor i in range(n):\n c,ti = (int(x) for x in input().split())\n A.append([c,ti])\n\nB = []\nfor i in A:\n if A[1] < t:\n B.append(i)\n\nif len(B):\n B.sort(key=lambda x: x[0])\n print(B[0])\nelse:\n print("TLE")', '# -*- coding: utf-8 -*... | ['Runtime Error', 'Accepted'] | ['s828135623', 's764122824'] | [3064.0, 3064.0] | [17.0, 17.0] | [275, 380] |
p03239 | u895741336 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["NT = list(map(int, input().split()))\nN = NT[0]\nT = NT[1]\nl = []\nfor i in range(N):\n l.append(list(map(int, input().split())))\n\nlf = list(filter(lambda x: x[1] <= T, l))\n\nif(len(lf) == 0):\n print('TLE')\nelse:\n ls = sorted(lf, key=lambda x: x[0])\n print(l.index(ls[0]) + 1)", "NT = list(map(int,... | ['Wrong Answer', 'Accepted'] | ['s820008519', 's471378978'] | [3064.0, 3064.0] | [17.0, 18.0] | [283, 273] |
p03239 | u899645116 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T = int(x) for x in input().split()\nC = 2000\nfor i in range(N):\n c,t = int(x) for x in input().split()\n if t <= T:\n C = min(c,C)\n \nif C == 2000:\n print("TLE")\nelse: print(C)\n', 'N,T = int(input().split())\nC = 2000\nfor i in range(N):\n c,t = int(input().split())\n if t <= T:\n C = min(c,C)\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s696076787', 's914410896', 's097401545'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [185, 162, 189] |
p03239 | u905582793 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T=map(int,input().split())\nls=[int(input()) for _ in range(N)]\nans='TLE'\nfor c,t in ls:\n if t <= T:\n ans = min(ans,c)\n \nprint(ans)", "N,T=map(int,input().split())\nls=[int(input()) for _ in range(N)]\nans=10**18\nfor i in ls:\n if i[0] <= T:\n ans = min(ans,i[1])\nif ans < 10**18:\n print(ans)\ne... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s070544782', 's473911881', 's558396378', 's822057514', 's884067702'] | [3056.0, 3056.0, 3056.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 17.0, 18.0] | [139, 180, 180, 175, 198] |
p03239 | u912833927 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n, T = map(int, input.split())\nres = 2000\nfor _ in range(n):\n c, t = map(int, input.split())\n if t > T: continue\n res = min(res, c)\nif res == 2000:\n print('TLE')\nelse:\n print(res)", "n, T = map(int, input().split())\nres = 2000\nfor _ in range(n):\n c, t = map(int, input().split())\n if t > T: continu... | ['Runtime Error', 'Accepted'] | ['s901466386', 's947370052'] | [2940.0, 2940.0] | [17.0, 17.0] | [184, 188] |
p03239 | u914797917 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T = map(int,input().split())\nci = []\nti = []\nfor i in range(N):\n c, t = input().split()\n ci.append(int(c))\n ti.append(int(t))\n\n#print(ci,ti)\n\nlowest=1000\n\nfor i in range(N):\n if ti[i]<=T and ci[i]<=lowest:\n lowest=ci[i]\nif max(ti)>T:\n print('TLE')\nelse:\n print(lowest)\n ", "N,T = map(int... | ['Wrong Answer', 'Accepted'] | ['s557090042', 's467703488'] | [3064.0, 3060.0] | [18.0, 17.0] | [282, 288] |
p03239 | u918601425 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,K=[int(s) for s in input().split()]\nm=10000\nn=10000\nfor i in range(N):\n a,b=[int(s) for s in input().split()]\n if b<K:\n n=min([n,a])\nif m==10000:\n print("TLE")\nelse:\n print(a)\n ', 'N,K=[int(s) for s in input().split()]\nn=10000\nfor i in range(N):\n a,b=[int(s) for s in input().split()]\n if ... | ['Wrong Answer', 'Accepted'] | ['s240057405', 's019355354'] | [3064.0, 2940.0] | [18.0, 17.0] | [189, 183] |
p03239 | u921563073 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['# -*- coding: utf-8 -*-\nn,t = map(int,input().split())\nans_no = 0\nans_cost = t\n\nfor i in range(n):\n a,b = map(int,input().split())\n if b<ans_cost:\n ans_no = a\n\nif ans_no = 0:\n print("TLE")\nelse print(ans_no)', '# -*- coding: utf-8 -*-\nn,t = map(int,input().split())\nans_cost = float(\'inf... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s509813038', 's797651871', 's880682213'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [223, 288, 276] |
p03239 | u922449550 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N, T = map(int, input().split())\nans = 'TLE'\ncost = float('inf')\n\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\n\nprint(ans)", "N, T = map(int, input().split())\nans = float('inf')\ncost = float('inf')\n\nfor i in range(N):\n c, t = map(int, input().split())\n if t... | ['Runtime Error', 'Accepted'] | ['s414808417', 's375087547'] | [2940.0, 2940.0] | [18.0, 18.0] | [166, 220] |
p03239 | u928784113 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N,T = map(int,input().split())\na= [map(int,input().split()) for i in range(N)]\nb = []\nfor i in range(N):\n b.append(a[i][0])\nL = sorted(b)\ni = 0\nwhile i < N:\n if L[i] < T:\n print(L[i])\n break\n else:\n i = i+1\n continue\nif i == N:\n print("TLE")', 'N,T = map(int,inpu... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s074034251', 's202967417', 's236978327', 's392822361', 's611897443', 's653147446', 's741947154'] | [3064.0, 2940.0, 3060.0, 2940.0, 3316.0, 3068.0, 3064.0] | [18.0, 18.0, 18.0, 19.0, 22.0, 18.0, 21.0] | [281, 183, 185, 176, 205, 177, 319] |
p03239 | u934868410 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,T = map(int, input())\nans = 1000\nfor i in range(n):\n c,t = map(int, input())\n if t <= T:\n ans = min(ans, c)\nprint(ans)', 'n,T = map(int, input().split())\nans = 1001\nfor i in range(n):\n c,t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\n\nif ans == 1001:\n print("TLE")\nelse:\n pr... | ['Runtime Error', 'Accepted'] | ['s903772257', 's429372456'] | [2940.0, 2940.0] | [17.0, 17.0] | [125, 181] |
p03239 | u940279019 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T = map(int,input().split())\nc,t = [list(map(int,input.split())) for i in N]\nmin_c = 1000\nhantei = 0\nans = 0\nfor i in N:\n tmp = 0\n if t[i] <= T:\n tmp = 1\n hantei += 1\n if tmp == 1:\n if c[i] < min_c:\n min_c = c[i]\n ans = i+1\nprint ans if hantei>0 else 'TLE' ", 'N,T = map(int,inpu... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s899980097', 's910593088', 's890146575'] | [3064.0, 3064.0, 3060.0] | [17.0, 18.0, 18.0] | [282, 262, 220] |
p03239 | u944209426 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t=map(int,input().split())\nct=[list(map(int,input().split())) for _ in range(n)]\nmc=100000\nfor i in range(n):\n if ct[i][1]<=t:\n if ct[i][0]<mc:\n mc=ct[i][0]\nif mi==-1:\n print("TLE")\nelse:\n print(mc)', 'n,t=map(int,input().split())\nct=[list(map(int,input().split())) for _ in ran... | ['Runtime Error', 'Accepted'] | ['s259351056', 's792215707'] | [3064.0, 3060.0] | [17.0, 18.0] | [227, 231] |
p03239 | u946424121 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n, T = map(int, input().split())\na = 1001\nfor i in range(n):\n c, t = map(int, input().split())\n if t < T:\n a = min(a.c)\nif a == 1001:\n print("TLE")\nelse:\n print(a)', 'n, T = map(int, input().split())\na = 1001\nfor i in range(n):\n c, t = map(int, input().split())\n if t <= T:\n a = min(a... | ['Runtime Error', 'Accepted'] | ['s559616563', 's723950763'] | [2940.0, 2940.0] | [17.0, 18.0] | [170, 183] |
p03239 | u947617358 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["n,T=map(int,input().strip().split())\narr=[]\nfor _ in range(n):\n c,t=map(int,input().strip().split())\n arr.append((c,t))\narr=sorted(arr,key=lambda x:x[0])\nflag=True\nfor a,b in arr:\n if b<=T:\n print(a)\n break\n else:\n flag=False \nif flag==False:\n print('TLE')\n \n", "... | ['Wrong Answer', 'Accepted'] | ['s267640240', 's710045429'] | [3060.0, 3060.0] | [17.0, 17.0] | [298, 316] |
p03239 | u951601135 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T=map(int,input().split())\nli = [list(map(int,input().split())) for i in range(N)]\nt_cost=[T - li[i][1] for i in range(N)]\nif(all(x < 0 for x in t_cost)):\n print('TLE')\nelse:\n t_cost_1=[]\n for i in range(N):\n if(t_cost[i]>=0):\n t_cost_1.append(i)\n else:\n print(min([li[t_cost_1[i]][0] for i... | ['Runtime Error', 'Accepted'] | ['s189351024', 's999554518'] | [3060.0, 3060.0] | [20.0, 18.0] | [334, 213] |
p03239 | u959759457 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T=map(int,input().split())\nm=1001\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n m=min(m,c)\nif m==1001:\n print('TLE')", "N,T=map(int,input().split())\nm=1001\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n m=min(m,c)\n \nif m==1001:\n print('TLE... | ['Wrong Answer', 'Accepted'] | ['s548934804', 's225395879'] | [2940.0, 2940.0] | [18.0, 17.0] | [148, 186] |
p03239 | u963903527 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n,t = map(int, input().split())\nl = []\nfor _ in range(n):\n i, c = map(int, input().split())\n if not c => j:\n l.append([c, j])\nl.sort(key=lambda x: x[1])\nprint(l[0][0])', "N,T = map(int, input().split())\nl = []\nfor i in range(N):\n c, t = map(int, input().split())\n if not t > T:\n l.append([i+1, c]... | ['Runtime Error', 'Accepted'] | ['s042817448', 's357106403'] | [2940.0, 3060.0] | [17.0, 17.0] | [172, 210] |
p03239 | u978313283 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ["N,T=map(int,input().split())\na=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n a.append(c)\nif len(a)==0:\n print('TLE')\nelse:\n a.sort()\n print(a[0][0])\n", "N,T=map(int,input().split())\na=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n a.a... | ['Runtime Error', 'Accepted'] | ['s458680607', 's418411922'] | [2940.0, 2940.0] | [18.0, 18.0] | [188, 185] |
p03239 | u987164499 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['from sys import stdin\nimport bisect\n\nn,t = [int(x) for x in stdin.readline().rstrip().split()]\nli = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]\nli2 = []\nfor i in range(n):\n if li[i][0] <= t:\n li2.append(li[i][0])\n\nli2.sort()\n\nprint(li2[0])', 'from sys import stdin\nimpor... | ['Runtime Error', 'Accepted'] | ['s368617937', 's111338829'] | [3060.0, 3064.0] | [18.0, 18.0] | [274, 318] |
p03239 | u989306199 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['N, T = map(int, input().split())\nans = 1000000\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\nprint(ans if ans < T else "TLE")\n', 'N, T = map(int, input().split())\nans = 1000000\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n ans... | ['Runtime Error', 'Accepted'] | ['s848252244', 's732362891'] | [2940.0, 2940.0] | [17.0, 18.0] | [173, 184] |
p03239 | u993622994 | 2,000 | 1,048,576 | When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC. You, the smartwatch, has found N routes to his home. If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i. Find the smallest cost of a route that takes not l... | ['n = int(input())\nh = list(map(int, input().split()))\nans = 1\n\nfor i in range(1, n):\n if max(h[:i]) <= h[i]:\n ans += 1\n\nprint(ans)', "n, t = map(int, input().split())\nct = [list(map(int, input().split())) for _ in range(n)]\nans = []\n\nfor i in ct:\n if i[1] <= t:\n ans.append(i)\n\nif no... | ['Runtime Error', 'Accepted'] | ['s000933358', 's007313137'] | [2940.0, 3060.0] | [17.0, 18.0] | [139, 242] |
p03241 | u001024152 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['from math import sqrt, ceil\nimport sys\n\nN, M = map(int, input().split())\nrootM = max(ceil(sqrt(M)), M//N)\n\nfor m in reversed(range(1, rootM+1)):\n if M % m == 0:\n print(m)\n if M // m >= N:\n print(m)\n sys.exit()', 'from math import sqrt, floor\n \nN, M = map(int,input()... | ['Wrong Answer', 'Accepted'] | ['s766429339', 's897768782'] | [3060.0, 3064.0] | [2104.0, 21.0] | [248, 274] |
p03241 | u020604402 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N ,M = map(int,input().split())\nans = 0\nfor i in range(1,int(M**(1/2)+1)):\n if M % i == 0:\n ans = max(ans,i)\n ans = max(ans,M//i)\nprint(ans)', 'N ,M = map(int,input().split())\nL = []\nans = 0\nfor i in range(1,int(M**(1/2)+1)):\n if M % i == 0:\n if i >= N: ans = max(ans,i)\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s416316230', 's952436851', 's946882234'] | [3060.0, 3060.0, 3060.0] | [21.0, 21.0, 21.0] | [157, 192, 192] |
p03241 | u022979415 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["from fractions import gcd\n\n\ndef main():\n n, m = map(int, input().split())\n print(gcd(m, m // n))\n\n\nif __name__ == '__main__':\n main()\n\n", "def main():\n n, m = map(int, input().split())\n f = [1, m]\n i = 2\n while i * i <= m:\n if m % i == 0:\n f.append(i)\n ... | ['Wrong Answer', 'Accepted'] | ['s571826369', 's105887809'] | [5304.0, 3060.0] | [39.0, 22.0] | [144, 389] |
p03241 | u026075806 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\ncand = M // N\n\nwhile cand > 0:\n print(cand)\n if M % cand == 0:\n #print(cand)\n exit()\n cand -= 1', 'def enum_divisors(n, reverse=False):\n divisors = []\n for i in range(1, int(math.sqrt(n)) ):\n if n % i == 0:\n divisors.append(i)... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s139524776', 's570306810', 's582041127', 's082423292'] | [24932.0, 3060.0, 3064.0, 3064.0] | [2104.0, 17.0, 20.0, 20.0] | [151, 444, 514, 402] |
p03241 | u026155812 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import bisect\nimport sys\nN, M = map(int, input().split())\nls = []\nfor i in range(1, int(M**(1/2))+1):\n if M%i == 0:\n ls.append(i)\nans = []\nfor x in ls:\n ans.append(x)\n ans.append(M//x)\nprint(ans[bisect.bisect_left(ans, N)])', 'import bisect\nN, M = map(int, input().split())\nls = []\nfor i ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s413333842', 's650206310', 's097544315'] | [3060.0, 3064.0, 3064.0] | [21.0, 21.0, 21.0] | [239, 204, 301] |
p03241 | u026788530 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nlis = []\n\nN,M = [int(i) for i in input().split()]\nM_ = M\ni = 2\nfor i in range(1,int(math.sqrt(M))):\n if M % i == 0:\n lis.append(i)\n lis.append(M//i)\n\nlis.sort()\nret = 0\nfor i in lis:\n if i > N:\n break\n ret = i\n\nprint(M_//ret )\n', '\nlis = []\n\nN,M = [int(... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015210867', 's109666369', 's118561035', 's222865682', 's391373482', 's952446644', 's183975941'] | [3064.0, 3064.0, 3064.0, 3060.0, 3064.0, 3060.0, 3060.0] | [23.0, 2104.0, 2103.0, 21.0, 2104.0, 21.0, 21.0] | [270, 455, 522, 238, 451, 224, 242] |
p03241 | u036340997 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\n\nans = 1\nfor i in range(1, int(m**0.5)+2):\n if i * n <= m:\n ans = max(ans, i)\n if (m // i) * n <= m:\n ans = max(ans, m//i)\n \nprint(ans)', 'n, m = map(int, input().split())\n\nans = 1\nfor i in range(1, int(m**0.5)+2):\n if m % i == 0:\n if i * n <= m:\n an... | ['Wrong Answer', 'Accepted'] | ['s518555077', 's821252206'] | [3060.0, 3060.0] | [42.0, 21.0] | [179, 204] |
p03241 | u037430802 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int, input().split()) \n\ni = 1\nans = 1\nwhile i * i <= m:\n if m % i == 0:\n if i >= n:\n if i >= n:\n ans = max(ans, m // i)\n elif m // i >= n:\n ans = max(ans(ans, i))\n \n i += 1\n \n \nprint(ans)', 'def is_prime(q):\n q = abs(q)\n if q == 2: return True\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s269992081', 's396391146', 's541329926', 's638136777', 's680797380', 's786849632', 's949159361', 's664176571'] | [3064.0, 3064.0, 2940.0, 3060.0, 2940.0, 3060.0, 3188.0, 3188.0] | [27.0, 19.0, 17.0, 29.0, 17.0, 2107.0, 24.0, 21.0] | [235, 362, 217, 264, 217, 217, 623, 280] |
p03241 | u044952145 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import sys\n\nN, M = map(int, input().split())\n\nfor i in range(int(math.sqrt(M))+1, 1, -1):\n if M % i == 0:\n if M >= N*i:\n print(i)\n sys.exit()', 'import sys\nInput = sys.stdin.readline\n\nN, M = map(int, Input().split())\n\nfor i in range(int(math.sqrt(M))+1, 1, -1):\n if M %... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s236049034', 's350070188', 's454360418'] | [2940.0, 2940.0, 3064.0] | [17.0, 18.0, 21.0] | [173, 200, 277] |
p03241 | u050138914 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import sys\nn,m=map(long,input().split())\nif n==1:\n print(m)\n sys.exit()\nans=[]\ni=1\nwhile i<=m/i:\n if m%i:\n i=i+1\n else:\n j=m/i\n if j>=n:\n ans.append(i)\n if i>=n:\n ans.append(j)\n i=i+1\nans.sort()\nprint(ans[len(ans)-1])', 'import sys... | ['Runtime Error', 'Accepted'] | ['s717195593', 's082037209'] | [3064.0, 3064.0] | [17.0, 29.0] | [286, 303] |
p03241 | u050698451 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\nd = []\nfor i in range(M, int(M**0.5)+1,-1):\n\tif M%i == 0:\n\t\td.append(i)\n\t\td.append(M/i)\nd.sort(reverse=True)\nfor i in range(len(d)):\n\tif d[i] <= M/N:\n\t\tprint(d[i])\n\t\texit()\n', 'N, M = map(int, input().split())\nd = []\nfor i in range(1, int(M**0.5)+1):\n\tif M%i =... | ['Wrong Answer', 'Accepted'] | ['s555879263', 's330822680'] | [2940.0, 3060.0] | [2104.0, 21.0] | [206, 199] |
p03241 | u052499405 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nn, m = [int(item) for item in input().split()]\n\nans = 1\nfor i in range(1, int(math.sqrt(m))+1):\n if m%i == 0 \n if m >= i*n:\n ans = max(ans, i)\n else:\n ans = max(ans, m%i)\n \nprint(ans)', 'import math\nn, m = [int(item) for item in input().split()]\n\nans = 0\nfor i in range(1... | ['Runtime Error', 'Accepted'] | ['s384359941', 's560821392'] | [2940.0, 3060.0] | [17.0, 21.0] | [215, 220] |
p03241 | u054412614 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_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]\nn,m=map(int,input().split())\narray=m... | ['Runtime Error', 'Accepted'] | ['s401329176', 's301342233'] | [9016.0, 9152.0] | [26.0, 34.0] | [417, 349] |
p03241 | u062459048 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int,input().split())\n\nan = m //n\nwhile an*n != m:\n an = m//n\n n = 1 + (m-1)*an\n \nprint(an)\n', 'n, m = map(int,input().split())\n\nan = m //n\nwhile an*n != m:\n an = m//n\n n = 1 + (m-1)//an\n \nprint(an)\n'] | ['Time Limit Exceeded', 'Accepted'] | ['s649785929', 's185657688'] | [2940.0, 2940.0] | [2104.0, 36.0] | [105, 106] |
p03241 | u065079240 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nN, M = map(int, input().split())\nans = 1\nfor i in range(2, math.ceil(math.sqrt(M))//3):\n if M % i == 0:\n if M // i >= 1:\n ans = i\n else:\n break\nprint(ans)\n', 'import math\nN, M = map(int, input().split())\nans = 1\nfor i in range(2, math.floor(math.sqrt(M))... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s975060772', 's976485377', 's061958997'] | [2940.0, 2940.0, 3060.0] | [19.0, 19.0, 22.0] | [206, 207, 257] |
p03241 | u069838609 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["from math import floor, ceil\nN, M = [int(elem) for elem in input().split(' ')]\n\nmax_gcd = 1\ncand = M // N\n\nfor cand in range(M // N, 1, -1):\n rest = M - cand * N\n if rest % cand == 0:\n max_gcd = max(max_gcd, cand)\n break\n else:\n continue", "from math import floor, ceil, sqrt\... | ['Wrong Answer', 'Accepted'] | ['s979463610', 's424284586'] | [3060.0, 3064.0] | [2103.0, 23.0] | [267, 1014] |
p03241 | u075012704 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\n\nif N == 1:\n print(M)\nelse:\n ans = 1\n for g in range(1, int(M ** 0.5) + 2):\n if M % g == 0 and M / g >= N:\n ans = max(ans, g)\n\n g2 = M / g\n if M % g2 == 0 and M / g2 >= N:\n ans = max(ans, int(g2))\n print(ans)\n', 'N, ... | ['Wrong Answer', 'Accepted'] | ['s437202665', 's039623921'] | [3316.0, 3060.0] | [32.0, 21.0] | [297, 277] |
p03241 | u077337864 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().strip().split())\n\ni=1\nwhile i*i < M:\n if M % i == 0:\n maxg = M // N\n i += 1\n\nprint(maxg)', 'N, M = map(int, input().strip().split())\n\ni=1\nwhile i <= M//N: \n if M % i == 0:\n maxg = i\n if M//i <= M//N:\n maxg = M // i\n break\n i += 1\n\nprint(maxg)\n'] | ['Runtime Error', 'Accepted'] | ['s687326650', 's541408287'] | [2940.0, 2940.0] | [26.0, 62.0] | [117, 169] |
p03241 | u085717502 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["\n# coding: utf-8\n\n# In[12]:\n\n\nimport numpy as np\n\n\n# In[65]:\n\n\nN,M = map(int, input().split())\n\n\n# In[66]:\n\n\ndef usage(n):\n print('\n fct = factorize(n)\n print(fct, num(fct))\n \n print('\n for div in divisorize(fct):\n print(div, num(div))\n\n\ndef factorize(n):\n fct ... | ['Runtime Error', 'Accepted'] | ['s365117476', 's010034180'] | [21220.0, 9128.0] | [319.0, 38.0] | [1132, 511] |
p03241 | u089142196 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nN,M=map(int,input().split())\n\nP=math.ceil(M**0.5)\nans=1\ni=1\n\nwhile i<=P:\n if M%i==0:\n j = M//i\n if j>=N:\n ans=j\n i +=1\n \nprint(ans)', 'from math import floor\nN,M=map(int,input().split())\np= floor(M**0.5)\nkumi=[]\n\nfor i in range(1,p+1):\n if M%i==0:\n kumi.append((i... | ['Wrong Answer', 'Accepted'] | ['s758106425', 's845157946'] | [3064.0, 3064.0] | [24.0, 21.0] | [161, 267] |
p03241 | u095426154 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nif m%i==0:\n ans=m//i\nelse:\n ans=m//i-1\nprint(ans)', 'def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n divisors.sort(... | ['Runtime Error', 'Accepted'] | ['s336573180', 's539098377'] | [2940.0, 3060.0] | [18.0, 20.0] | [84, 354] |
p03241 | u102126195 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\nans = 1\n\nS = M / N\nS = int(S)\n#print(S)\nimport math\nif N == 1:\n ans = M\nelse:\n not_sosu = -1\n for i in range(2, int(math.sqrt(M)) + 1):\n if M % i == 0:\n not_sosu = 1\n if M / i >= N and M % i == 0:\n ans = max(ans, i)\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s529288318', 's618944907', 's887326942'] | [3064.0, 3064.0, 2940.0] | [21.0, 21.0, 33.0] | [462, 554, 261] |
p03241 | u102461423 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M = map(int, input().split())\n\n\n\ndivisors = []\nfor d in range(1, M+1):\n if d*d > M:\n break\n divisors.append(d)\n divisors.append(M//d)\n\nans = 1\n\nfor d in divisors:\n if N*d <= M:\n ans = d\n\nprint(ans)', 'N,M = map(int, input())\n\n\n\ndivisors = []\nfor d in range(1, M+1):\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s787043078', 's797094708', 's325754440'] | [5628.0, 3060.0, 3060.0] | [38.0, 17.0, 25.0] | [281, 273, 323] |
p03241 | u108617242 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nN, M = map(int, input().split())\ntmp = [1]\nif N == 1:\n print(M)\nelse:\n for i in range(2, int(math.ceil(M**0.5))):\n if M % i == 0:\n tmp.append(i)\n tmp.apend(M/i)\n ans = 1\n for x in tmp:\n if m / x >= N:\n ans = max(ans, x)\n print(ans... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s306118548', 's703469569', 's751353024', 's264548628'] | [3188.0, 3188.0, 3188.0, 3188.0] | [21.0, 21.0, 21.0, 21.0] | [306, 307, 301, 312] |
p03241 | u114920558 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nN, M = map(int, input().split())\n\nans = 1\nif(N < M//N):\n i = N\n while(ans == 1 and i <= math.sqrt(M)):\n if(M % i == 0):\n ans = M//i\n i += 1\nelse:\n i = M//N\n while(ans == 1 and i >= 1):\n if(M % i == 0):\n ans = i\n i -= 1\n \nprint(ans)', 'import math\nN, M = map(int... | ['Wrong Answer', 'Accepted'] | ['s708477030', 's202104070'] | [3060.0, 3064.0] | [26.0, 64.0] | [270, 291] |
p03241 | u118642796 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M = map(int,input().split())\nl = m//n\nif M+1-N < l:\n for i in range(N,M+1):\n if M%i == 0:\n print(M//i)\n break\nelse:\n for i in range(l,-1,-1):\n if m % i == 0:\n print(i)\n break', 'N,M = map(int,input().split())\nans_candidate = range(N,M+1)\nf... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s004863826', 's170823800', 's295526508', 's852701187', 's748738856'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 2103.0, 2104.0, 17.0, 33.0] | [240, 146, 104, 97, 146] |
p03241 | u127499732 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["def main():\n from math import gcd\n n, m = map(int, input().split())\n\n if gcd(n, m) == 1:\n print(1)\n exit()\n\n l = int(m / n)\n for i in range(l, 1, -1):\n p, q = divmod(m, i)\n if q != 0 or p < n:\n continue\n\n print(i)\n break\n\n\nif __name... | ['Runtime Error', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s069629508', 's228596460', 's290079693', 's515854093'] | [3060.0, 5176.0, 5048.0, 2940.0] | [17.0, 2104.0, 2104.0, 1791.0] | [329, 300, 334, 190] |
p03241 | u129836004 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\nx = 0\nm = 0\nfor i in range(10**5):\n if i**2 < M <= i*(i+1):\n m = i+1\n break\nfor i in range(N, m):\n if M % i == 0:\n x = M // i\n break\nif x == 0:\n for i in reversed(range(1,m+1)):\n if M % i == 0:\n x = i\n br... | ['Wrong Answer', 'Accepted'] | ['s401768658', 's780059999'] | [3060.0, 3060.0] | [54.0, 57.0] | [315, 347] |
p03241 | u136090046 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import fractions\nimport math\n\nn,m = map(int, input().split())\n\nres = 0\ntmp = math.ceil(m/n)\nfor i in range(1, tmp+1):\n res = (max(res, fractions.gcd(i, m-((n-1)*i))))\nprint(res)\n', 'import fractions\n\nn,m = map(int, input().split())\n\nres = 0\ntmp = math.ceil(m/n)\nfor i in range(1, tmp+1):\n res = ... | ['Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s214477870', 's923824403', 's911510675'] | [5432.0, 5436.0, 3060.0] | [2108.0, 44.0, 22.0] | [181, 169, 289] |
p03241 | u139112865 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['#112_D\nN,M=map(int,input().split())\n\ndivisors=[]\nfor i in range(1,int(M**.5)+1):\n if M%i==0:\n divitors.append(i)\n if i!=(M//i):\n divitors.append(M//i)\nAns=1\nfor x in divitors:\n if M//N>=x:\n Ans=x\n else:\n break\nprint(Ans)', '#112_D\nN,M=map(int,input().spl... | ['Runtime Error', 'Accepted'] | ['s271325258', 's272146519'] | [3060.0, 3188.0] | [21.0, 22.0] | [301, 309] |
p03241 | u160244242 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\n\nn,m = map(int, input().split())\n\nfor i in range(1, math.ceil(math.sqrt(m+1))):\n if m % i != 0:\n continue\n if m // i > n:\n continue\n ans = i\nprint(ans)', 'inputlist = list(map(int, input().split()))\nn, m = inputlist[0], inputlist[1]\n\nfor i in range(1, int(math.sqrt(m+1)... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s535290969', 's721835386', 's265747725'] | [2940.0, 2940.0, 3064.0] | [22.0, 18.0, 22.0] | [186, 218, 274] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.