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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02783 | u348270417 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a=map(int,input().split())\natt=0\nwhile(h<0):\n h=h-a\n att=att+1\n \nprint(att)', 'h,a=map(int,input().split())\natt=0\nwhile(h!=0):\n att+=1\n h=h-a\nprint(att)', "h,a = int(input()).split(' ')\nattack =0\nwhile(h>0):\n h=h-a;\n attack=attack+1\nprint(attack)", 'h,a=map(int,input().split())\nif(h%a!=0):\n print(h//a+1)\nelse:\n print(h//a)'] | ['Wrong Answer', 'Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s308364712', 's784176757', 's892981569', 's913675182'] | [2940.0, 2940.0, 2940.0, 2940.0] | [19.0, 2104.0, 17.0, 17.0] | [79, 75, 92, 76] |
p02783 | u349444371 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=,map(int,input().split())\n \nn=(H//A)+1\n\nif H%A==0:\n n=H//A\nelse:\n n=(H//A)+1\nprint(n)', 'H,A=,map(int,input().split())\n\nn=(H//A)+1\nprint(n)', 'H,A=map(int,input().split())\n \nn=(H//A)+1\n \nif H%A==0:\n n=H//A\nelse:\n n=(H//A)+1\nprint(n)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s144887306', 's585028928', 's932114231'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [91, 50, 91] |
p02783 | u350093546 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nprint(math.ceil(int(input())/int(input())))', 'import math\nh,a=map(int,input().split())\nprint(math.ceil(h/a))\n'] | ['Runtime Error', 'Accepted'] | ['s742373893', 's866739979'] | [2940.0, 3064.0] | [17.0, 17.0] | [55, 63] |
p02783 | u353060051 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['x,y = map(int,input().split())\n\ncount = x//y\n\nif x%y == 0:\n count += 1\n\nprint(count)', "x,y = map(int,input().split())\n\nli = list(map(int,input().split()))\n\na = sum(li)\n\nif a > x:\n print('Yes')\nelse:\n print('No')\n", 'x,y = map(int,input().split())\n\ncount = x//y\n\nif x%y != 0:\n count += 1\n\nprint(count)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s734302803', 's766378886', 's107809355'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [87, 131, 87] |
p02783 | u353919145 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\n\n\ndef get_inputs():\n inputs = input().split(" ")\n monsters_num, diff, attack = int(inputs[0]), int(inputs[1]), int(inputs[2])\n monsters = []\n for monster in range(monsters_num):\n inputs = input().split(" ")\n coordinate, health = int(inputs[0]), int(inputs[1])\n monsters.append({"coordinate": coordinate, "health": health})\n return monsters, diff, attack, monsters_num\n\n\ndef between_coordinates(monster, coordinate, diff):\n if (coordinate - diff <= monster["coordinate"] <= coordinate) or (\n coordinate <= monster["coordinate"] <= coordinate + diff):\n return True\n return False\n\n\ndef sort_monsters_coordinates(monsters):\n return sorted(monsters, key=lambda k: k[\'coordinate\'])\n\n\ndef get_alive_monsters(monsters):\n return [monster for monster in monsters if monster["health"] > 0]\n\n\ndef attack_leftmost_monster(coordinate, monsters, attack, diff):\n bombs_num = 0\n if len(monsters) == 0:\n return 0\n leftmost_monster = monsters.pop(0)\n needed_attacks = math.ceil(leftmost_monster["health"] / attack)\n bombs_num += needed_attacks\n for monster in monsters:\n if between_coordinates(monster, coordinate, diff):\n monster["health"] -= (needed_attacks * attack)\n monsters = get_alive_monsters(monsters)\n return monsters, bombs_num\n\n\ndef get_max_health(monsters):\n if len(monsters) == 0:\n return 0\n\n max_health = - math.inf\n for monster in monsters:\n if monster["health"] >= max_health:\n max_health = monster["health"]\n return max_health\n\n\nmonsters, diff, attack, monsters_num = get_inputs()\nif len(monsters) > 0:\n monsters = sort_monsters_coordinates(monsters)\nelse:\n print(0)\n\ncoordinate = monsters[0]["coordinate"] + diff\ntotal_bombs_num = 0\n\nwhile len(monsters) > 0 and coordinate <= monsters[-1]["coordinate"] - diff:\n monsters, bombs_num = attack_leftmost_monster(coordinate, monsters, attack, diff)\n total_bombs_num += bombs_num\n if len(monsters) > 0:\n coordinate = monsters[0]["coordinate"] + diff\n \nprint(total_bombs_num + math.ceil(get_max_health(monsters) / attack))', 'tmp = list(input().split())\nH=int(tmp[0])\nN=int(tmp[1])\nx=H // N\nprint (x+1 if (H % N) else x)'] | ['Runtime Error', 'Accepted'] | ['s351832364', 's023534882'] | [3192.0, 2940.0] | [18.0, 17.0] | [2158, 94] |
p02783 | u354623416 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['attack,health = map(int,input().split())\nif health % attack == 0 :\n print ( health // attack ) \nelse :\n print ( health % attack + 1 )\n\n', 'attack,health = map(int,input().split())\nif health % attack == 0 :\n print ( health // attack ) \nelse :\n print ( health // attack + 1 )\n', 'attack,health = map(int,input().split())\nif health % attack == 0 :\n print ( health // attack ) \nelse :\n print ( health % attack + 1 )\n\n', 'health,attack = map(int,input().split())\nif health % attack == 0 :\n print ( health // attack ) \nelse :\n print ( health // attack + 1 )\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s089826236', 's110813804', 's886542788', 's284781688'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [144, 144, 144, 144] |
p02783 | u356499208 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = map(int, input().split())\n\nif h%a == 0:\n input(h/a)\nelse:\n input(h/a+1)', 'h, a = map(int, input().split())\n\nif h%a == 0:\n print(int(h/a))\nelse:\n print(int(h/a+1))\n '] | ['Runtime Error', 'Accepted'] | ['s513078066', 's798512650'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 93] |
p02783 | u357120030 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['ri = lambda S: [int(v) for v in S.split()]\ndef rii(): return ri(input())\n \nH, A = rii()\n \nprint(H // A)', 'ri = lambda S: [int(v) for v in S.split()]\ndef rii(): return ri(input())\n\nH, A = rii()\n\nprint((H // A)', 'ri = lambda S: [int(v) for v in S.split()]\ndef rii(): return ri(input())\n \nH, A = rii()\nH, r = divmod(H, A)\nr = 1 if r else r\nprint(H + r)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s092929286', 's760148857', 's384058984'] | [9092.0, 8968.0, 9112.0] | [28.0, 23.0, 29.0] | [103, 102, 138] |
p02783 | u357230322 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a=map(int(input()))\nif h%a==0:\n print(h//a)\nelse:\n print(h//a+1)', 'h,a=map(input(int()))\nif h%a==0:\n print(h//a)\nelse:\n print(h//a+1)', 'h,a=map(int,input().split())\nif h%a==0:\n print(h//a)\nelse:\n print(h//a+1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s121549443', 's404133295', 's952520110'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [68, 68, 75] |
p02783 | u364027015 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=map(int,input().split())\nprint((H-0.5)//A+1)', 'H,A=map(int,input().split())\nprint((H-1)//A+1)'] | ['Wrong Answer', 'Accepted'] | ['s694199970', 's610373380'] | [9176.0, 9064.0] | [28.0, 30.0] | [48, 46] |
p02783 | u366531443 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = int(input("モンスターの体力を入力してください")) \nA = int(input("サーバルの攻撃力を入力してください"))\ni = 0\nwhile H > 0:\n H -=A\n i += 1\n print("モンスターの体力は", end="")\n print(H, end="")\n print("です。")\n \nprint("よって",end = "")\nprint(i, end = "")\nprint("回の攻撃でモンスターに勝つことができます")\n', 'i = list(map(int, input().split()))\n\nif i[0] == i[1]:\n print("1")\nelif i[0] % i[1] > 0:\n print((i[0] // i[1]) + 1)\nelse :\n print(i[0] // i[1])\n'] | ['Runtime Error', 'Accepted'] | ['s352582029', 's397037850'] | [3060.0, 2940.0] | [17.0, 17.0] | [396, 152] |
p02783 | u368249389 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = int(input())\n\nmemo_count = {}\ndef searchCount(h):\n if h==1: \n return 1\n elif h in memo_count:\n return memo_count[h]\n else:\n h_half = int(h / 2)\n memo_count[h] = 1 + 2*searchCount(h_half)\n return memo_count[h]\n\nprint(searchCount(H))\n', 'H, A = map(int, input().split())\n\ncount = 0\nwhile H > 0:\n H = H - A\n count = count + 1\n\nprint(count)\n'] | ['Runtime Error', 'Accepted'] | ['s674397282', 's998951643'] | [2940.0, 2940.0] | [17.0, 18.0] | [294, 107] |
p02783 | u370217787 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import numpy as np\n\nH, N = list(map(int, input().split()))\n\nx = list(map(int, input().split()))\n\nwin = 0\nfor i in range(N):\n\tfor j in range(i+1, N):\n\t\tif x[i] + x[j] >= H:\n\t\t\twin = 1\n\t\t\tprint("Yes")\n\t\t\tbreak\n\tif win == 1:\n\t\tbreak\n\n\nif win == 0:\n\tprint("No")', 'import numpy as np\n\nN, A = map(int, input().split())\n\nans = N // A\n\nif N%A>0:\n\tans += 1\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s468630609', 's116659087'] | [21908.0, 21500.0] | [316.0, 318.0] | [257, 99] |
p02783 | u370721525 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\nanswer = H // A\nprint(answer)', 'H, A = map(int, input().split())\na = H // A\nb = H % A\nif b == 0:\n print(a)\nelse:\n print(a + 1)'] | ['Wrong Answer', 'Accepted'] | ['s851230970', 's891334031'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 96] |
p02783 | u372501464 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nH,A = input().strip().split()\nprint(math.ceil(H/A))', 'import math\nH, A = map(int, input().strip().split())\nprint(math.ceil(H/A))'] | ['Runtime Error', 'Accepted'] | ['s891628439', 's958030686'] | [2940.0, 2940.0] | [18.0, 17.0] | [63, 74] |
p02783 | u373047809 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['(h,n),*t=[list(map(int,o.split()))for o in open(0)]\nd=[0]*(h+10100)\nfor i in range(1,h+1):d[i]=min(d[i-a]+b for a,b in t)\nprint(d[h])', 'h, a = map(int, input().split())\nprint(-(-h//a))'] | ['Runtime Error', 'Accepted'] | ['s986354442', 's519408503'] | [9140.0, 2940.0] | [26.0, 17.0] | [133, 48] |
p02783 | u373228444 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["h, n = map(int, input().split())\na = list(map(int, input().split()))\ns = sum(a)\nif h <= s:\n\tprint('YES')\nelse:\n\tprint('NO')", 'h, a = map(int, input().split())\nif h % a == 0:\n\tprint(h//a)\nelse:\n\tprint(h//a + 1)'] | ['Runtime Error', 'Accepted'] | ['s227638033', 's656274433'] | [2940.0, 2940.0] | [17.0, 17.0] | [123, 83] |
p02783 | u374004058 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = int(input())\nA = int(input())\nif H % A == 0:\n print(H//A)\nelse:\n print(H//A + 1)\nreturn', 'D = list(map(int, input().split()))\nH,A = D[0], D[1]\n\nif( H%A == 0):\n print(H//A)\nelse:\n print(H//A + 1)'] | ['Runtime Error', 'Accepted'] | ['s960381880', 's350220268'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 110] |
p02783 | u378782369 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,W=input().split(" ")\nprint(str(math.ceil(H / W)))', 'import math\ns = list(map(int, input().split()))\nprint(str(math.ceil(s[0] / s[1])))'] | ['Runtime Error', 'Accepted'] | ['s981594587', 's812767293'] | [3064.0, 2940.0] | [17.0, 17.0] | [51, 82] |
p02783 | u379319399 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H , A = input().split().\ncount = 0\nwhile H > 0:\n H -= A\n count +=1\n\nprint(count)\n', 'H , A = int(input().split().)\ncount = 0\nwhile H > 0:\n H -= A\n count +=1\n\nprint(count)\n', 'H , A = map(int,input().split())\ncount = 0\nwhile H > 0:\n H -= A\n count +=1\n\nprint(count)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s001960307', 's022257190', 's424042838'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0] | [87, 92, 95] |
p02783 | u388463553 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=input().split()\nprint(int(H)//int(A)+1 if 1<=H<=10000 and 1<=A<=10000)', 'H,A=map(int,input().split())\nif 1<=H<=10000 and 1<=A<=10000:\n print(H//A+1 if H%A!=0 else int(H/A))'] | ['Runtime Error', 'Accepted'] | ['s132022294', 's362875322'] | [8968.0, 9164.0] | [26.0, 27.0] | [74, 102] |
p02783 | u388698992 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, intput().split())\nres = H // A\nif H % A > 0:\n \tres += 1\nprint(res)\n', 'H, A = map(int, input().split())\nres = H // A + (H % A > 0)\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s983972101', 's598878191'] | [9000.0, 9128.0] | [22.0, 25.0] | [84, 70] |
p02783 | u394352233 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, N = input().split()\nH = int(H)\n#print(H)\n#H, N = input().split()\nlis = list(map(int,input().split()))\nA =sum(lis)\nif H > A:\n print("No")\nelse:\n print("Yes")', 'H,A = map(int, input().split())\nnum = 0\nwhile H >0:\n num += 1\n H -= A\nprint(num)'] | ['Runtime Error', 'Accepted'] | ['s354974578', 's440170425'] | [3060.0, 2940.0] | [19.0, 18.0] | [165, 82] |
p02783 | u396210538 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['from sys import stdin\n\nH,A = [int(x) for x in stdin.readline().rstrip().split()]\nif H%A==0:\n print(H/A)\nelif A>H :\n print(1)\nelse :\n print(1+H/A)', 'from sys import stdin\n\nH,A = [int(x) for x in stdin.readline().rstrip().split()]\nif H%A==0:\n print(int(H/A))\nelif A>H :\n print(1)\nelse :\n print(1+int(H/A))\n'] | ['Wrong Answer', 'Accepted'] | ['s971968836', 's653463504'] | [2940.0, 2940.0] | [17.0, 17.0] | [154, 165] |
p02783 | u396472025 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["input1 = input().split(' ')\ninput2 = input().split(' ')\nn = int(input1[0])\nk = int(input1[1])\nh = input2\n\nfor _ in range(k):\n if len(h) == 0:\n break\n h.pop(h.index(max(h)))\n\nh = list(map(int, input2))\nprint(sum(h))", "input = input().split(' ')\nh = int(input[0])\na = int(input[1])\n\nif h % a == 0:\n print(int(h/a))\nelse:\n print(h//a + 1)\n"] | ['Runtime Error', 'Accepted'] | ['s724239641', 's162777173'] | [3064.0, 2940.0] | [19.0, 17.0] | [219, 121] |
p02783 | u396723412 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['a,b=map(int,input().split())\nif a%b!=0:print((a//b)+1) else:print(a//b)\n', 'a,b=map(int,input().split())\nif a%b!=0:print((a//b)+1)\nelse:print(a//b)\n'] | ['Runtime Error', 'Accepted'] | ['s445913869', 's209607442'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 72] |
p02783 | u399779657 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = input().split()\nH = [int(i) for i in H]\n\nif H[0] > H[1]:\n H[0] = H[0] - H[1]\n count+ = 0\nelse:\n count+ = 1\nprint(count)', 'H = input().split()\nH = [int(i) for i in H]\n\ncount = 0\n\nwhile True:\n if H[0] > H[1]:\n H[0] = H[0] - H[1]\n count+=1\n else:\n count = count + 1\n break\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s022167831', 's204491131'] | [2940.0, 2940.0] | [17.0, 19.0] | [132, 194] |
p02783 | u403331159 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a=map(int,input().split())\ncnt=0\nwhile():\n h=h-a\n if h>=0:\n cnt+=1\n else:\n print(cnt)', 'h,a=map(int,input().split())\ncnt=0\nwhile(h>0):\n h=h-a\n cnt+=1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s367468274', 's423480435'] | [2940.0, 2940.0] | [17.0, 18.0] | [96, 74] |
p02783 | u404660239 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["H, N = map(int, input().split())\nA_list = list(map(int, input().split()))\nif H <= sum(A_list):\n print('Yes')\nelse:\n print('No')", 'import numpy as np\n\nH, A = map(int, input().split())\n\nprint(int(np.ceil(H/A)))'] | ['Runtime Error', 'Accepted'] | ['s784129588', 's360895513'] | [2940.0, 12420.0] | [17.0, 148.0] | [133, 78] |
p02783 | u405080602 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\n\ndef resolve():\n\n H,N=map(int,input().split())\n\n A=list(map(int,input().split()))\n\n if sum(A)>=H:\n print("Yes")\n else:\n print(\'No\')\n\n\nimport sys\nfrom io import StringIO\nimport unittest\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n def test_入力例_1(self):\n input = """10 3\n4 5 6"""\n output = """Yes"""\n self.assertIO(input, output)\n def test_入力例_2(self):\n input = """20 3\n4 5 6"""\n output = """No"""\n self.assertIO(input, output)\n def test_入力例_3(self):\n input = """210 5\n31 41 59 26 53"""\n output = """Yes"""\n self.assertIO(input, output)\n def test_入力例_4(self):\n input = """211 5\n31 41 59 26 53"""\n output = """No"""\n self.assertIO(input, output)\n\nif __name__ == "__main__":\n unittest.main()', 'H,A=map(int,input().split())\nans=0\nif H%A==0:\n print(H//A)\nelse:\n print(H//A+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s479022244', 's990947305'] | [5808.0, 2940.0] | [47.0, 17.0] | [1152, 86] |
p02783 | u405733072 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int,input().split())\nprint(h//a+map(h%a!=0))', 'h,a = map(int,input().split())\nprint(h//a+(h%a!=0))'] | ['Runtime Error', 'Accepted'] | ['s214265249', 's880347670'] | [8996.0, 9016.0] | [27.0, 28.0] | [54, 51] |
p02783 | u410973943 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = int(input(""))\nA = int(input(""))\n\ni = 0\nwhile H > 0:\n H -= A\n i += 1\n\nprint(i)', 'H, A = map(int, input().split())\n\ni = 0\nwhile H > 0:\n H -= A\n i += 1\n\nprint(i)'] | ['Runtime Error', 'Accepted'] | ['s118533474', 's337908221'] | [2940.0, 2940.0] | [17.0, 19.0] | [89, 84] |
p02783 | u411302151 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['from math import seil\n\nH, A = map(int, input().split())\nprint(ceil(H/A))', 'H, A = map(int, input().split())\n\nif (H % A):\n print((H//A)+1)\nelse:\n print(H//A)'] | ['Runtime Error', 'Accepted'] | ['s305953047', 's602833506'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 87] |
p02783 | u414048826 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nh, a = map(int, input().split())\n\nprint(math.ceil(a / h))', 'import math\nh, a = map(int, input().split())\nprint(math.ceil(h / a))'] | ['Wrong Answer', 'Accepted'] | ['s173876707', 's577645591'] | [2940.0, 3060.0] | [17.0, 19.0] | [69, 68] |
p02783 | u419877586 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\n\nH, A = map(int, input().split())\nprint(math.floor(H/A))', 'import math\n\nH, A = map(int, input().split())\nprint(math.ceil(H/A))'] | ['Wrong Answer', 'Accepted'] | ['s533959674', 's464106850'] | [2940.0, 2940.0] | [21.0, 17.0] | [68, 67] |
p02783 | u419963262 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=input().split()\nS=1\nif int(H)-S*int(A)>0:\n S+=1\nelse:\n print(S)', 'H,A=input().split()\nS=1\nif int(H)-S*int(A)>=0:\n S+=1\nelse:\n print(S)', 'H,A=input().split()\nS=1\nwhile int(H)-S*int(A)>0:\n S+=1\nprint(S)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s371228672', 's775927034', 's332229300'] | [3064.0, 2940.0, 2940.0] | [17.0, 18.0, 22.0] | [69, 70, 64] |
p02783 | u432357988 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = int(input().split())\ni = 1\n\nfor j in range(10000):\n \n H = H - A\n \n \n if H <= 0:\n i = i\n else:\n i = i + 1\n\n\nif H <= 0:\n print(i)', 'H = input()\nA = input()\n\ni = 1\n\n\nfor j in range(10000):\n H = H - A\n if H < 0 :\n print(i)\n else:\n i = i + 1', 'H, A = map(int, input().split())\ni = 1\n\nfor j in range(10000):\n H = H - A\n if H <= 0:\n i = i\n else:\n i = i + 1\nif H <= 0:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s668609386', 's877523526', 's776430992'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 19.0] | [208, 143, 157] |
p02783 | u438662618 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["INF = 100100100\n\nh, n = map(int, input().split())\nab = []\nmaxA = -1\nfor i in range(n) :\n a, b = map(int, input().split())\n ab.append([a, b])\n maxA = max(maxA, a)\n\n#dp = [[INF for i in range(h+1)] for j in range(n+1)]\ndp = [INF for i in range(h+maxA+1)]\ndp[0] = 0\nfor i in range(n) :\n for j in range(h+1) :\n dp[j+ab[i][0]] = min(dp[j+ab[i][0]], dp[j]+ab[i][1])\n\nprint(min(dp[h:]))\n\n\n'''\nfor i in range(n) :\n for j in range(h+1) :\n dp[i+1][j] = min(dp[i+1][j], dp[i][j])\n dp[i+1][min(j+ab[i][0], h)] = min(dp[i+1][min(j+ab[i][0], h)], dp[i+1][j]+ab[i][1])\n'''\n\n# print(dp[i])\n", 'h, a = map(int, input().split())\nprint(-(-h//a))\n'] | ['Runtime Error', 'Accepted'] | ['s210022341', 's796949094'] | [3064.0, 2940.0] | [17.0, 17.0] | [635, 49] |
p02783 | u439709490 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["value = input().split(' ')\nhp = int(value[0])\nat = int(value[1])\nfor index in range(hp):\n hp = hp - at\n if hp <= 0:\n print(index)\n break", "hp, at = map(int, input().split(' '))\nans = 0\nwhile hp > ans * at:\n ans += 1\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s311945678', 's981658457'] | [2940.0, 2940.0] | [18.0, 19.0] | [144, 89] |
p02783 | u442581202 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int,input().split())\nprint(h//a + (h%a>0)', 'h,a = map(int,input().split())\nprint(h//a + (h%a>0))'] | ['Runtime Error', 'Accepted'] | ['s494656233', 's338017645'] | [2940.0, 2940.0] | [17.0, 20.0] | [51, 52] |
p02783 | u442877951 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nA,H= map(int, input().split())\nprint(math.ceil(H//A))', 'A,H= map(int, input().split())\ncount = 0\nwhile H <= 0:\n H -= A\n count+=1', 'A,H= map(int, input().split())\ncount = 0\nwhile H <= 0:\n H -= A\n count+=1\n print(count)', 'import math\nA,H= map(int, input().split())\nprint(math.ceil(H/A))', 'A,H= map(int, input().split())\ncount = 0\nwhile H <= 0:\n H -= A\n count+=1\nprint(count)', 'import math\n \nH,A = list(map(int, input().split()))\n \nprint(math.ceil(H/A)', 'import math\n \nH,A = list(map(int, input().split()))\n \nprint(math.ceil(H/A))'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s166732471', 's344983664', 's533810140', 's617471619', 's797382226', 's880370983', 's225619263'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [65, 74, 88, 64, 87, 74, 75] |
p02783 | u446371873 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int,input().split())\nn = 0\nwhile h > 0:\n n += 1\n h -= a', 'h,a = map(int,input().split())\nn = 0\nwhile h > 0:\n n += 1\n h -= a\nprint(n)'] | ['Wrong Answer', 'Accepted'] | ['s935315469', 's837685679'] | [2940.0, 2940.0] | [20.0, 19.0] | [67, 76] |
p02783 | u446711904 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a=mp(int,input().split());print(h//a+1 if h%a!=0 else h//a)', 'h,a=map(int,input().split());print(h//a+1 if h%a!=0 else h//a)'] | ['Runtime Error', 'Accepted'] | ['s699148607', 's019077093'] | [2940.0, 3316.0] | [17.0, 20.0] | [61, 62] |
p02783 | u448720391 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int,input().split())\nn = h/a\nif n%1 == 0:\n print(n//1)\nelse:\n print((n//1)+1)', 'h,a = map(int,input().split())\nn = h/a\nif n%1 == 0:\n print(n)\nelif n%1 < 0:\n print(1)\nelse:\n print((n//1)+1)', 'h,a = map(int,input().split())\nn = h/a\nif n%1 == 0:\n print(n//1)\nelif n%1 < 0:\n print(1)\nelse:\n print((n//1)+1)', 'h,a = map(int,input().split())\nb = h/a\nif b%1 == int(0):\n print(b)\nelif b%1 < 0:\n print(1)\nelse:\n print(b//1)', 'h,a=map(int,input().split(" "))\n\nif h%a==0:\n print(h/a)\nelse:\n primt((h//a)+1)', 'h,a=map(int,input().split(" "))\n\nif h%a==0:\n print(h/a)\nelse:\n primt(h//a+1)', 'h,a = map(int,input().split())\nb = h/a\nif b%1 = 0:\n print(b)\nelif b%1 < 0:\n print(1)\nelse:\n print(b//1)', 'print(-eval(("-"+input()).replace(" ","//")))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s013996922', 's122637228', 's130778899', 's184994691', 's567293690', 's720262638', 's929735007', 's930912455'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0] | [93, 117, 120, 118, 80, 78, 112, 45] |
p02783 | u451206510 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A = map(int, input().split())\nprint(math.ceil(H/A))\n', 'import math\nH,A = map(int, input().split())\nprint(math.ceil(H/A))\n'] | ['Runtime Error', 'Accepted'] | ['s741235885', 's426245457'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 66] |
p02783 | u453623947 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\n\nans = H // A + (H % A) * 1\n\nprint(ans)', 'H, A = map(int, input().split())\n\nans = H // A + (H % A)/(H % A) * 1\n\nprint(ans)', 'H, A = map(int, input().split())\n\nif H % A == 0 :\n ans = H / A\nelse :\n ans = H // A + 1\n\nprint(round(ans))\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s026609826', 's345559183', 's537006930'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [72, 80, 113] |
p02783 | u453683890 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["inport math\nline = input().split(' ')\nM = int(line[0])\nN = int(line[1])\nprint(math.floor(M/N))", "inport math\nline = input().split(' ')\nM = int(line[0])\nN = int(line[1])\nprint(math.ceil(M/N))\n", "import math\nline = input().split(' ')\nM = int(line[0])\nN = int(line[1])\nprint(math.ceil(M/N))\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s078803307', 's397938388', 's185178538'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [94, 94, 94] |
p02783 | u453815934 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\na,b=map(int,input().split())\nprint(mayh.ceil(a/b))', 'import math\na,b=map(int,input().split())\nprint(math.ceil(a/b))'] | ['Runtime Error', 'Accepted'] | ['s045970093', 's993980069'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 62] |
p02783 | u454524105 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nh, a = map(int, input().split())\nprint(int(math.floor(h/a)))', 'h, a = map(int, input().split())\nans = 1\nwhile True:\n if a*ans >= h:\n break\n else: ans += 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s117331222', 's433548333'] | [2940.0, 2940.0] | [17.0, 19.0] | [72, 115] |
p02783 | u455642216 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=map(int,input().split())\nif H%A==0:\n print(H//A)\nelse:\n print((round(H/A,0))+1)', 'H,A=map(int,input().split())\nif H%A==0:\n print(H//A)\nelse:\n print((H/A)+1)', 'H,A=map(int,input().split())\nif H%A==0:\n print(H//A)\nelse:\n print((H/A,0)+1)', 'H,A=map(int,input().split())\nif H%A==0:\n print(H//A)\nif H%A!=0:\n print((H//A)+1)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s398163442', 's533924163', 's577555463', 's203913649'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0, 17.0] | [89, 80, 82, 86] |
p02783 | u456107000 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nH=int(input ())\nA=int (input())\nprint(math.ceil (H/A))\n', 'import math\nH,A=map(int, input().split())\nprint(math.ceil (H/A))\n'] | ['Runtime Error', 'Accepted'] | ['s339706324', 's536509820'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 65] |
p02783 | u459965464 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['x = input().split()\nn = int(x[0])\nk = int(x[1])\n \nh = input().split()\n \nsorted(h)\n \nif n-k <= 0:\n print(0)\n exit()\n \nc = 0\nfor i in range(n-k):\n c += int(h[i])\nprint(c)\n \n', 'x = input().split()\nn = int(x[0])\nk = int(x[1])\n \nh = input().split()\n \nh = sorted(h)\n \nif n-k <= 0:\n print(0)\n exit()\n \nc = 0\nfor i in range(n-k):\n c += int(h[i])\nprint(c)\n \n', 'x = input().split()\nn = int(x[0])\nk = int(x[1])\n \nh = input().split()\n \nsorted(h)\n \nif n-k <= 0:\n print(0)\n exit()\n \nc = 0\nfor i in range(n-k):\n c += int(h[i])\nprint(c)\n ', 'x = input().split()\nh = int(x[0])\na = int(x[1])\nif h%a == 0:\n print(h//a)\nelse:\n print(h//a+1)\n '] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s469024890', 's628218478', 's928921052', 's000143533'] | [2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [183, 187, 182, 105] |
p02783 | u460386402 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A=int(input().split())\ncount=0\n\nwhile H>=0:\n H-=A\n count+=1\n\nprint(A)', 'H,A=map(int,input().split())\ncount=0\n\nwhile H>0:\n H=H-A\n count+=1\n\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s808892082', 's563872290'] | [2940.0, 2940.0] | [17.0, 19.0] | [73, 81] |
p02783 | u464912173 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['N, K = map(int,input().split())\nH = list(map(int,input().split()))\n\nH.sort(reverse=True)\ndel H[:K]\nH_sum = sum(H)\nprint(H_sum)\n', 'n,k= map(int,input().split())\nh = list(map(int,input().split()))\nh.sort()\nif n<=k:\n print(0)\nelse:\n a = h[0:n-k]\n print(sum(a))', 'n,k= map(int,input().split())\nh = list(map(int,input().split()))\nh.sort()\nif n<=k:\n print(0)\nelse:\n a = h[:n-k]\n print(sum(a))', 'n,k, *h = map(int,open(0).read().split())\nh.sort()\nif n<=k:\n print(0)\nelse:\n a = h[:n-k]\n print(sum(a))', 'n,k, *h = map(int,open(0).read().split())\nh.sort \nif n<=k:\n print(0)\nelse:\n a = h[:n-k]\n print(sum(a))', 'n,k, *h = map(int,open(0).read().split())\nh.sort()\nif n<=k:\n print(0)\nelse:\n a = h[0:n-k]\n print(sum(a))', 'N, K = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nprint(sum([0] + H[:-K]) if K > 0 else sum(H))\n', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nif N<=K:\n print(0)\nelse:\n print(sum(H[0:N-K]))', 'H, A = map(int,input().split())\n\nans = 0\n\nwhile H>0:\n\tans += 1\n\tH -= A\n\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s015597611', 's241974985', 's271568189', 's275938723', 's352548741', 's416702559', 's550124932', 's967683848', 's291819041'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3188.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0, 19.0] | [127, 130, 129, 106, 105, 107, 123, 127, 82] |
p02783 | u467307100 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, n = map(int, input().split())\na = map(int, input().split())\nans = "Yes" if sum(a) >= h else "No" \nprint(ans)\n ', 'a, b = map(int, input().split())\nans = -(-a//b)\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s095674526', 's240243899'] | [2940.0, 2940.0] | [17.0, 17.0] | [121, 60] |
p02783 | u475598608 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['a,b,c,d=map(int,input().split())\nprint(max(a*b,c*d))', 'a,b,c,d=map(int,input().split())\nprint(max(a*b,c*d))', 'H,A=map(int,input().split())\ncount=0\nwhile H>0:\n H-=A\n count+=1\nprint(count)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s612420033', 's822710443', 's465481366'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0] | [52, 52, 78] |
p02783 | u477319617 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int, input().split())\n# U = input()\nans = 0\n\n# print((a-1,b) if (s[0]==u) else a,b-1)\nwhile True:\n h -= a\n if h<0:\n break\n ans+=1\n\nprint(ans)', 'h,a = map(int, input().split())\n# U = input()\nans = 0\n\n# print((a-1,b) if (s[0]==u) else a,b-1)\nwhile True:\n h -= a\n ans+=1\n if h<=0:\n break\n \n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s660348422', 's579991304'] | [2940.0, 2940.0] | [18.0, 19.0] | [167, 173] |
p02783 | u478452067 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import numpy as np\nN, a = list(map(int, input().split()))\n\nprint(np.round(np.ceil(N/a)))', 'import sys\nimport numpy as np\n\nlines = sys.stdin.readlines()\n\nH, _ = list(map(int, lines[0].split()))\nAB = np.array([ np.array(list(map(float, s.split()))) for s in lines[1:] ]).flatten().reshape((-1,2))\n\nABnorm = AB[:,1] / AB[:, 0]\nAB = np.insert(AB, 2, ABnorm, axis=1)\nAB = AB[AB[:,0].argsort(), :]\nAB = AB[AB[:,2].argsort(), :]\n\n\nbaseAmari = H\nminv = -1\nsyomo = 0\nsyomo1min = 99999999\nfor i in range(len(AB)):\n if minv<AB[i, 2]:\n if baseAmari<=int(AB[i,0]):\n syomo += int(AB[i,1])\n break \n minv = int(AB[i, 2])\n baseAt = baseAmari // int(AB[i,0])\n syomo += baseAt * int(AB[i,1])\n syomo1 = syomo + int(AB[i,1])\n if syomo1min>syomo1:\n syomo1min = syomo1\n baseAmari = baseAmari - baseAt*int(AB[i,0])\n if baseAmari == 0:\n break\n\nif syomo > syomo1min:\n syomo = syomo1min\nprint(syomo)', 'import numpy as np\nN, a = list(map(int, input().split()))\n \nprint(int(np.ceil(N/a)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s536904179', 's666089867', 's494059014'] | [21400.0, 12448.0, 21656.0] | [327.0, 149.0, 312.0] | [88, 832, 84] |
p02783 | u479868443 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['i = list(map(int, input().split()))\nif i[0] % i[1] > 0:\n print(i[0] / i[1] + 1)\nelse:\n print(i[0] / i[1]) ', 'i = list(map(int, input().split()))\nif i[0] % i[1] > 0:\n print(i[0] // i[1] + 1)\nelse:\n print(int(i[0] / i[1]))'] | ['Wrong Answer', 'Accepted'] | ['s848582968', 's107673747'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 113] |
p02783 | u480038302 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h,a = map(int,input().split())\nif h%a == 0:\n print(h//a)\nelse:\nprint((h//a)+1)', 'h,a = map(int,input().split())\nif h%a == 0:\n print(h//a)\nelse:\n print((h//a)+1)'] | ['Runtime Error', 'Accepted'] | ['s585608028', 's766031136'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 85] |
p02783 | u483304397 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = input().split()\nimport math\nprint(math.ceil(H/A))', 'import math\nH, A = input().split()\nH = int(H)\nA = int(A)\nprint(math.ceil(H/A))'] | ['Runtime Error', 'Accepted'] | ['s751999037', 's190952314'] | [2940.0, 2940.0] | [17.0, 18.0] | [56, 78] |
p02783 | u486251525 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\ntimes, mod = divmod(H, A)\nif mod != 0:\n times += times + 1\nprint(times)\n', 'H, A = map(int, input().split())\ntimes, mod = divmod(H, A)\nif mod != 0:\n times += 1\nprint(times)\n'] | ['Wrong Answer', 'Accepted'] | ['s499299734', 's772009004'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 100] |
p02783 | u487594898 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['a=int(input())\nb=int(input())\nprint(-(-a//b))', 'x,y = map(int,input().split()) \nprint(-(-x//y))\n\n'] | ['Runtime Error', 'Accepted'] | ['s704907192', 's796090737'] | [3064.0, 2940.0] | [18.0, 17.0] | [45, 49] |
p02783 | u488272873 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = int(input())\n\ng = int(H / 2)\nans = 0\nif g == 0:\n print(1)\nelse:\n n = 0\n while True:\n if 2 ** (n + 1) < H:\n n += 1\n elif 2 ** (n + 1) >= H:\n n += 1\n break\n for i in range(n + 1):\n ans = ans + (2 ** i)\nprint(ans)', '\nH, A = map(int, input().split())\n\ncount = 0\nwhile H > 0:\n H = H - A\n count += 1\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s839553908', 's772714431'] | [3060.0, 2940.0] | [18.0, 19.0] | [280, 99] |
p02783 | u488925368 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['hp, atk = input().split()\n\nhp = int(hp)\natk = int(atk)\n\nvalue = 0\n\nnumlist = list((input().split()))\n\nnumlist = list(map(int, numlist))\n\nfor i in range(atk):\n value = value + numlist[i]\n \nif value > hp:\n print("Yes")\nelse:\n print("No")', 'import math\n\nhp, atk = input().split()\n\nhp = int(hp)\n\natk = int(atk)\n\nprint(math.ceil(hp / atk))'] | ['Runtime Error', 'Accepted'] | ['s880642481', 's893840182'] | [3060.0, 2940.0] | [20.0, 17.0] | [247, 96] |
p02783 | u491330513 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ["H, N = map(int, input().split())\nA = list(map(int, input().split()))\nif H <= sum(A):\n print ('Yse')\nelse:\n print ('No')", '#a,b = map(int, input().split())\nimport math\nif __name__ == "__main__":\n H,A = map(int,input().split())\n print(math.ceil(H / A))'] | ['Runtime Error', 'Accepted'] | ['s282906144', 's551772958'] | [2940.0, 2940.0] | [17.0, 18.0] | [121, 134] |
p02783 | u492074881 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A= input().split()\nH=int(H)\nA=int(A)\nans=0\nif (H % A==0):\n ans=int(H/A)\nelse:\n ans=int(H/A)\n', 'H,A= input().split()\nH=int(H)\nA=int(A)\nans=0\nif (H % A==0):\n ans=int(H/A)\nelse:\n ans=int(H/A)+1\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s243623723', 's778251412'] | [2940.0, 2940.0] | [17.0, 18.0] | [100, 113] |
p02783 | u493130708 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['#L, R = map(int,input().split())\nH,N = map(int,input().split())\nA = list(map(int,input().split()))\n \na = 0\nfor i in A:\n a += i\n \nif a>=H:\n print("Yes")\nelse:\n print("No")', '#L, R = map(int,input().split())\nH,A = map(int,input().split())\n\nr = H % A\nif r == 0:\n ans = H/A\nelse:\n ans = (H-r)/A+1\n\nprint(int(ans))'] | ['Runtime Error', 'Accepted'] | ['s651750931', 's401138874'] | [2940.0, 2940.0] | [17.0, 17.0] | [174, 138] |
p02783 | u498699271 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | [', a = map(int, input().split())\n\ni = 0\n\nwhile h > 0:\n h = h - a\n i += 1\n\nprint(i)', "H = input()\narr = [int(i) for i in H.split(' ')]\ncount = 1\nif(arr[0]<arr[1]):\n\tprint(count)\nelse:\n\twhile arr[0]>arr[1]:\n\t\tarr[0] = arr[0] - arr[1]\n\t\tcount = count + 1\n\tprint(count)"] | ['Runtime Error', 'Accepted'] | ['s491425998', 's301964115'] | [2940.0, 3060.0] | [17.0, 20.0] | [87, 180] |
p02783 | u499106786 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = input().split(" ")\nprint((H+A-1)//A)', 'H, A = input().split(" ")\nH = int(H)\nA = int(A)\nreturn (H+A-1)//A', 'H, A = input().split(" ")\nreturn (H+A-1)//A', 'H, A = input()\nnum = (H + (A-1))//A\nprint(num)', 'H, A = input().split(" ")\nH = int(H)\nA = int(A)\nprint((H+A-1)//A)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s009727384', 's088800008', 's185682504', 's635848052', 's871079633'] | [2940.0, 3064.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [43, 65, 43, 46, 65] |
p02783 | u500297289 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\n\nprint(H // A + min(H % A))\n', 'H, A = map(int, input().split())\n\nprint(H // A + min(H % A, 1))\n'] | ['Runtime Error', 'Accepted'] | ['s363144861', 's745686604'] | [3060.0, 2940.0] | [19.0, 17.0] | [61, 64] |
p02783 | u500897254 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\nint(H/A)+1', 'H, A = map(int, input().split())\nif int(H/A)==H/A:\n print(int(H/A))\nelse:\n print(int(H/A)+1)'] | ['Wrong Answer', 'Accepted'] | ['s847670852', 's297509147'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 98] |
p02783 | u500990280 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['def main():\n hp, num = map(int, input().split())\n a = list(map(int, input().split()))\n attack = sum(a)\n\n if hp > attack:\n print("No")\n else:\n print("Yes")\n\nif __name__ == "__main__":\n main()\n', 'H, A = map(int,input().split())\nprint(-(-H//A))'] | ['Runtime Error', 'Accepted'] | ['s806129466', 's347486800'] | [3316.0, 3316.0] | [19.0, 19.0] | [223, 47] |
p02783 | u501265339 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sorted(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n for i in range(K):\n del H[i]\n print(sum(H))\n', 'H, A = map(int, input().split(" "))\n\nprint(-(-H//A))'] | ['Runtime Error', 'Accepted'] | ['s037997934', 's182787807'] | [2940.0, 2940.0] | [17.0, 17.0] | [176, 52] |
p02783 | u505793792 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['N, K= map(int, input().split())\nNli = [int(x) for x in input().split()]\nNli.sort()\nif N > K:print(sum(Nli[0:N-K]))\nelse: print(0)', 'H, A = map(int, input().split())\ntimes = H / A\nif int(times) == times:\n print(int(times))\nelse:\n print(int(times) + 1)'] | ['Runtime Error', 'Accepted'] | ['s160420516', 's479481143'] | [2940.0, 2940.0] | [20.0, 19.0] | [129, 124] |
p02783 | u507113442 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A =map(int,input())\nprint((H//A)+1)\n', 'H,A =map(int,input().split())\nprint(H//2+1)', 'a,b=map(int,input().split())\ns=sum(map(int,input().split()))\nprint("Yes" if a>=s else "No")\n', 'H,A =map(int,input().split())\nprint((H//2)+1)', 'H,A =map(int,input().split())\nprint(H//A+(1 if not H%A==0 else 0))'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s073708931', 's230730690', 's783429815', 's925023985', 's006645159'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 18.0] | [38, 43, 92, 45, 66] |
p02783 | u507145838 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int,input.split())\ncount = 0\nwhile H > 0:\n H -= A\n count += 1\n \nprint(count)', 'H, A = map(int,input().split())\ncount = 0\nwhile H > 0:\n H -= A\n count += 1\n \nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s334424423', 's948700926'] | [2940.0, 2940.0] | [17.0, 19.0] | [90, 92] |
p02783 | u507237474 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\n\na = int(H/A)\nb = int(H%A)\n\nif (b!=0)and(H>A):\n b+=1\n\nprint(a)', 'H, A = map(int, input().split())\n\na = int(H/A)\nb = int(H%A)\n\nif b!=0:\n a+=1\n\nprint(a)'] | ['Wrong Answer', 'Accepted'] | ['s917983670', 's635268786'] | [2940.0, 2940.0] | [17.0, 17.0] | [96, 86] |
p02783 | u507826663 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['def attk(HP,Magic,D0):\n T = HP // Magic[0][0]\n MD0 = T * Magic[0][1]\n MD1 = (T+1) * Magic[0][1]\n Z = HP % Magic[0][0]\n ND = Magic[0][1]\n if Z == 0:\n return MD0\n if len(Magic) == 1:\n return MD1\n Magic.pop(0)\n A = attk(Z,Magic,ND)\n if D0 > MD0+A:\n if MD1 > MD0+A:\n return MD0+A\n else:\n return MD1\n else:\n return D0\n\n\n\nH,N = map(int,input().split())\nA =[]\nfor i in range(N):\n a,b = map(int,input().split())\n A.append((a,b,a/b))\n#print(A)\nB = sorted(A, key=lambda s: s[1]) \nC = sorted(B, key=lambda s: s[2], reverse=True) \n#print(C)\n\nfor i in range(N-1):\n if C[N-1-i][2] ==C[N-2-i][2]:\n C.pop(N-1-i)\n#print(C)\nTDMAX = (H // C[0][0])*C[0][1]\nif (H%C[0][0])!=0:\n TDMAX += C[0][1]\nTD = attk(H,C,TDMAX)\nprint(TD)', 'H,N = map(int,input().split())\nMagic =[]\nA =[]\nE =[]\nfor i in range(N):\n a,b = map(int,input().split())\n Magic.append((a,b))\n A.append(a)\n E.append(a/b)\nMAX_A = H+max(A)\nE_MIN = min(E)\nWORST = int(MAX_A/E_MIN) +2\n#print(Magic)\n#print(MAX_A)\n#print(WORST)\nDP = [[WORST] * (MAX_A+1) for i in range(N)]\nfor i in range(N):\n if i == 0:\n for j in range(1,MAX_A//Magic[0][0]+1):\n DP[0][j*Magic[0][0]] = Magic[0][1]*j\n else:\n for j in range(1,(MAX_A+1)):\n# KARI = []\n DP[i][j]=DP[i-1][j]\n if j % Magic[i][0] == 0:\n DP[i][j]=min(DP[i][j],((j//Magic[i][0]) * Magic[i][1]))\n r = j // Magic[i][0]\n for k in range(r):\n DP[i][j]=min(DP[i][j],(DP[i-1][j-k*Magic[i][0]]+k*Magic[i][1]))\nprint(min(DP[N-1][H:MAX_A]))\n\n \n \n \n', 'H,A = map(int,input().split())\nX = int(H // A)\nif (H%A)!=0:\n X += 1\nprint(X)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s139565582', 's617449501', 's195660963'] | [3188.0, 3064.0, 2940.0] | [19.0, 17.0, 17.0] | [813, 867, 79] |
p02783 | u508061226 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = input().split;\nh = int(h);\na = int(a);\n\nif h % a == 0:\n ans = int(h // a);\nelse:\n ans = int(h // a + 1);\n \nprint(ans);', 'h, a = input().split();\nh = int(h);\na = int(a);\n\nif h % a == 0:\n ans = int(h // a);\nelse:\n ans = int(h // a + 1);\n \nprint(ans);\n'] | ['Runtime Error', 'Accepted'] | ['s454242734', 's867512464'] | [2940.0, 2940.0] | [17.0, 18.0] | [128, 131] |
p02783 | u509625752 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\n\n\nif H/A % 2 == 0:\n count_e = H/A\n print(int(count_e))\n \nelif int(H/A) % 2 == 1:\n count_o = int(H/A) + 1\n print(count_o)\n \nelif H < A:\n count_u = 1\n print(count_u)', 'H, A = map(int, input().split())\n\n\nif H % A == 0:\n count_e = H//A \n print(count_e)\n\nelif H < A:\n count_u = 1\n print(count_u)\n \nelif H % A != 0:\n count_o = H // A + 1\n print(count_o)\n \n'] | ['Wrong Answer', 'Accepted'] | ['s741079861', 's279171750'] | [9108.0, 9128.0] | [27.0, 27.0] | [221, 210] |
p02783 | u511379665 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['a,b=map(int,input().split())\nif a%b==0:\n print(a//b)\nelse:\n print(a//b+1)a,b=map(int,input().split())\nif a%b==0:\n print(a//b)\nelse:\n print(a//b+1)', 'a,b=map(int,input().split())\nif a%b==0:\n print(a//b)\nelse:\n print(a//b+1)'] | ['Runtime Error', 'Accepted'] | ['s937436017', 's800309874'] | [2940.0, 2940.0] | [17.0, 17.0] | [158, 79] |
p02783 | u511870776 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input.split())\ni = 0\nwhile H > 0:\n H -= A\n i += 1\nprint(i)\n', 'H, A = map(int, input.split())\ni = 0\nwhile H <= 0:\n H -= A\n i += 1\nprint(i)', 'H, A = map(int, input().split())\ni = 0\nwhile H > 0:\n H -= A\n i += 1\nprint(i)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s877583062', 's977490079', 's570365786'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [77, 77, 79] |
p02783 | u512315557 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['N, M=map(int,input().split())\ncount=0\nX=0\nwhile N >= X:\n X = M * count\n count += 1\nprint(count)', 'N, M=map(int,input().split())\ncount=1\nX=0\nwhile N > X:\n X = M * count\n count += 1\nprint(count-1)'] | ['Wrong Answer', 'Accepted'] | ['s225328372', 's180666643'] | [2940.0, 2940.0] | [18.0, 19.0] | [97, 98] |
p02783 | u517447467 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = list(map(int, input().split()))\nprint((h-a+1)//a)', 'h, a = list(map(int, input().split()))\nprint((h+a-1)//a)'] | ['Wrong Answer', 'Accepted'] | ['s074688608', 's009735794'] | [2940.0, 2940.0] | [17.0, 17.0] | [56, 56] |
p02783 | u517674755 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = [int(x) for x in input().split()]\nprint(math.ceil(H/A))', 'import math\nH, A = [int(x) for x in input().split()]\nprint(math.ceil(H/A))'] | ['Runtime Error', 'Accepted'] | ['s776554714', 's092995739'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 74] |
p02783 | u517870745 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = int(input())\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint(cnt)', "h = int(input())\na = int(input())\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint('{}'.format(cnt))", 'h = int(input())\na = int(input())\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint(cnt)', 'h, a = input()\n\nh = int(h)\na = int(a)\n\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint(cnt)', 'h = int(input())\na = int(input())\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint(cnt)', 'h, a = map(int, input().split())\n\ncnt = 0\n\nwhile (h > 0):\n\th -= a\n\tcnt += 1\n\nprint(cnt)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s244226817', 's487981872', 's719785153', 's779750729', 's986281612', 's580965157'] | [2940.0, 2940.0, 3316.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0, 17.0, 17.0, 18.0] | [73, 100, 87, 92, 87, 87] |
p02783 | u518299986 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H = input()\nA = input()\ncount = 0\n\n\nwhile H > 0:\n H -= A\n count +=1\nelse:\n print(count)', 'H = input()\nA = input()\ncount = 0\n\n\nwhile H > A:\n H -= A\n count +=1\nelse:\n print(count)', 'H = int(input())\nA = int(input())\ncount = 0\n\n\nwhile H > 0:\n H -= A\n count +=1\nprint(count)', 'H,A = map(int,input().split())\n\n"""\ncount = 0\n\nwhile H > 0:\n H -= A\n count +=1\n\nprint(count)\n\n"""', 'H = int(input())\nA = int(input())\ncount = 0\n\n\nwhile H > 0:\n H -= A\n count +=1\nelse:\n print(count)', 'H,A = map(int,input().split())\n\n\ncount = 0\n\nwhile H > 0:\n H -= A\n count +=1\n\nprint(count)\n\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s242287255', 's349593752', 's559404277', 's673588262', 's688149186', 's945434360'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 19.0, 17.0, 17.0, 17.0, 18.0] | [96, 96, 96, 103, 106, 97] |
p02783 | u523764640 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = input().split()\nprint(int(h/a) + 1)', 'h, a = input()\nprint(int(h/a) + 1)', 'h, a = input().split()\nprint(int(h)/int(a) + 1)', 'h, a = input()\nprint(int(h)/int(a) + 1)', 'import math\n \nh, a = map(int, input().split())\nprint(math.ceil(h/a))'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s135968990', 's243439033', 's610049159', 's809324747', 's849561351'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 21.0, 17.0, 17.0] | [42, 34, 47, 39, 68] |
p02783 | u530883476 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['A,B=map(int,input().split())\nC=list(input())\ncount= 0\nfor i in range (B):\n\tcount=count+int(C[i])\nif count<=A:\n\tprint("Yes")\nelse: print("No")', 'A,B=map(int,input().split())\nC=list(input().split())\ncount= 0\nfor i in range (B):\n\tcount=count+int(C[i])\nif count>=A:\n\tprint("Yes")\nelse: print("No")', 'A,B=map(int,input().split())\nC=list(input())\ncount= 0\nfor i in range (B):\n\tcount=count+int(C[i])\nif count>=A:\n\tprint("Yes")\nelse: print("No")', 'import math\na, b = map(int, input().split()) \nprint(math.ceil(a/b))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s146795391', 's813153984', 's984512617', 's026729300'] | [3316.0, 2940.0, 2940.0, 2940.0] | [21.0, 17.0, 17.0, 17.0] | [141, 149, 141, 67] |
p02783 | u534634083 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,N = map(int,input().split())\nA = input().split()\nif H - (int(sorted(A)[-1]) + int(sorted(A)[-2])) <= 0:\n print("Yes")\nelse:\n print("No")', 'H,N = map(int,input().split())\nA = input().split()\nif H - (int(sorted(A)[-1]) + int(sorted(A)[-2])) > 0:\n print("Yes")\nelse:\n print("No")', 'enemmyCountN,killerTimeK = map(int,input().split())\nenemyHp = input().split()\n\nenemyHp.sort()\n\nresultEnemyCount = enemmyCountN - killerTimeK\ncountNormal = 0\n\n\nfor i in range(resultEnemyCount):\n countNormal += int(enemyHp[i])\n\nprint(countNormal)', 'enemmyCountN,killerTimeK = map(int,input().split())\nenemyHp = input().split()\n\nintEnemyHp = [int(i) for i in enemyHp]\nintEnemyHp.sort()\n\nresultEnemyCount = enemmyCountN - killerTimeK\ncountNormal = 0\n\nif killerTimeK >= enemmyCountN:\n print(0)\n\nelse:\n for i in range(resultEnemyCount):\n countNormal += intEnemyHp[i]\n print(countNormal)', 'h,a = input().split()\nresult = int(h)\ntimes=0\nwhile result > 0:\n result-=int(a)\n times+=1\nprint(times)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s341890940', 's539430255', 's601954227', 's764314748', 's508090050'] | [2940.0, 2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 20.0] | [144, 143, 247, 349, 108] |
p02783 | u541551314 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split(" "))\nprint(H//A + (1 if H%A ==0 else 0))\n', 'hp, _ = map(int, input().split(" "))\ns = sum(map(int, input().split(" ")))\nprint((hp - s) <= 0)\n', 'H, A = map(int, input().split(" "))\nprint(H//A + (1 if H%A != 0 else 0))\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s369407612', 's686997458', 's825489605'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [72, 96, 73] |
p02783 | u544587633 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['import math\nH,A = list(map(int, input().split()))\n\nprint(math.ceil(H / a))', "#!/usr/bin/env python3\nimport sys\nimport math\n\ndef solve(H: int, A: int):\n print(math.ceil(H / A))\n return 0\n\n\n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n H = int(next(tokens)) # type: int\n A = int(next(tokens)) # type: int\n solve(H, A)\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s926012574', 's109225142'] | [2940.0, 3060.0] | [17.0, 17.0] | [74, 580] |
p02783 | u549047581 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A = map(int,input().split())\nprint(H/A//1)', 'H = input()\nA = input()\nprint(H/A//1)', 'H,A = map(int,input().split())\nif A == 0:\n print(0)\nb = H/A//1\nif H/A > b:\n print(int(b+1))\nelse:\n print(int(b))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s489993703', 's500267084', 's141334743'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [44, 37, 121] |
p02783 | u550535134 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H, A = map(int, input().split())\nprint(H//A)', 'import math\nH, A = map(int, input().split())\nprint(math.ceil(H,A))\n', 'import math\nH, A = map(int, input().split())\nprint(math.ceil(H/A))\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s468282210', 's656347377', 's577466513'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0] | [44, 67, 67] |
p02783 | u554879783 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,A = (int(x) for x input().split())\n\nif not H <= 10^4 && H >= 1:\n return False\nif not A <= 10^4 && H >= 1:\n return False\n\nint count = 0\nwhile H >= 0:\n count=+\n H = H - A\n\nprint(count)', 'import math\n\nH,A = map(int,input().split())\nf, i = math.modf(H/A)\n\nif not H <= 10^4 and H >= 1:\n False\nif not A <= 10^4 and H >= 1:\n False\n\nif f == 0:\n print(int(i))\nif f != 0:\n print(int(i+1))\n'] | ['Runtime Error', 'Accepted'] | ['s781253031', 's329739528'] | [2940.0, 3060.0] | [18.0, 17.0] | [188, 198] |
p02783 | u557494880 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['H,N = map(int,input().split())\nA = []\nB = []\nfor i in range(N):\n a,b = map(int,input().split())\n A.append(a)\n B.append(b)\nh = 2*10**4\ndp = [10**9 for i in range(h+1)]\ndp[0] = 0\nfor i in range(N):\n a = A[i]\n b = B[i]\n for j in range(h+1):\n if j < a:\n continue\n dp[j] = min(dp[j-a]+b,dp[j])\nans = 10**9\nfor i in range(H,h+1):\n ans = min(ans,dp[i])\nprint(ans)', 'import math\nH,A = map(int,input().split())\nprint(math.ceil(H/A))'] | ['Runtime Error', 'Accepted'] | ['s062979798', 's074018832'] | [3064.0, 2940.0] | [17.0, 17.0] | [402, 64] |
p02783 | u559891647 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['h, a = map(int, input())\nprint(-(-h // a))', 'h, a = map(int, input().split())\nprint(-(-h // a))'] | ['Runtime Error', 'Accepted'] | ['s265193656', 's558974930'] | [2940.0, 2940.0] | [17.0, 17.0] | [42, 50] |
p02783 | u562550538 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['a = int(input())\nb = int(input())\n\ncount=0\nwhile a >0:\n\ta -= b\n\tcount+=1\nprint(count)', 'a,b= int(input()).split()\n\ncount=0\nwhile a >0:\n\ta -= b\n\tcount+=1\nprint(count)', '\na,b=map(int, input().split())\n\ncount=0\nwhile a >0:\n\ta -= b\n\tcount+=1\nprint(count)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s050365894', 's519936990', 's081290312'] | [2940.0, 2940.0, 2940.0] | [19.0, 17.0, 19.0] | [85, 77, 82] |
p02783 | u563676207 | 2,000 | 1,048,576 | Serval is fighting with a monster. The _health_ of the monster is H. In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health. Serval wins when the monster's health becomes 0 or below. Find the number of attacks Serval needs to make before winning. | ['# input\nH, N = map(int, input().split())\nAB = [list(map(int, input().split())) for _ in range(N)]\n\n# process\nINF = 10**9\ndp = [INF]*(H+max(a for a, _ in AB))\ndp[0] = 0\n\nfor i in range(H):\n if dp[i] == INF:\n continue\n for a, b in AB:\n t = dp[i]+b\n if dp[i+a] > t:\n dp[i+a] = t\n\n# output\nprint(min(dp[H:]))\n', '# input\nH, A = map(int, input().split())\n\n# output\nif H%A == 0: print(H//A)\nelse: print(H//A+1)\n'] | ['Runtime Error', 'Accepted'] | ['s174966019', 's100847855'] | [3064.0, 2940.0] | [17.0, 17.0] | [343, 96] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.