結果
問題 | No.2227 King Kraken's Attack |
ユーザー | buey_t |
提出日時 | 2023-02-25 12:12:19 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,741 bytes |
コンパイル時間 | 468 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 89,444 KB |
最終ジャッジ日時 | 2024-10-02 11:32:07 |
合計ジャッジ時間 | 7,624 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 126 ms
85,500 KB |
testcase_01 | AC | 123 ms
85,468 KB |
testcase_02 | AC | 123 ms
85,184 KB |
testcase_03 | AC | 126 ms
85,668 KB |
testcase_04 | AC | 125 ms
84,916 KB |
testcase_05 | AC | 125 ms
85,284 KB |
testcase_06 | AC | 124 ms
85,816 KB |
testcase_07 | AC | 124 ms
85,308 KB |
testcase_08 | AC | 121 ms
85,048 KB |
testcase_09 | WA | - |
testcase_10 | AC | 120 ms
84,992 KB |
testcase_11 | AC | 122 ms
85,360 KB |
testcase_12 | AC | 122 ms
84,992 KB |
testcase_13 | AC | 127 ms
85,188 KB |
testcase_14 | AC | 184 ms
89,172 KB |
testcase_15 | AC | 152 ms
85,224 KB |
testcase_16 | AC | 149 ms
85,248 KB |
testcase_17 | WA | - |
testcase_18 | AC | 123 ms
84,912 KB |
testcase_19 | AC | 135 ms
88,952 KB |
testcase_20 | AC | 136 ms
89,000 KB |
testcase_21 | AC | 141 ms
88,764 KB |
testcase_22 | AC | 130 ms
85,544 KB |
testcase_23 | AC | 122 ms
85,508 KB |
testcase_24 | AC | 148 ms
89,160 KB |
testcase_25 | AC | 121 ms
85,308 KB |
testcase_26 | WA | - |
testcase_27 | AC | 121 ms
84,908 KB |
testcase_28 | AC | 137 ms
89,240 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 137 ms
89,064 KB |
testcase_32 | AC | 139 ms
89,208 KB |
testcase_33 | AC | 138 ms
89,444 KB |
testcase_34 | WA | - |
testcase_35 | AC | 141 ms
89,216 KB |
testcase_36 | AC | 138 ms
89,168 KB |
testcase_37 | AC | 124 ms
84,936 KB |
testcase_38 | AC | 123 ms
85,464 KB |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | AC | 123 ms
85,200 KB |
testcase_42 | AC | 123 ms
85,528 KB |
testcase_43 | WA | - |
testcase_44 | AC | 124 ms
85,304 KB |
testcase_45 | WA | - |
ソースコード
def main(): try: import pypyjit pypyjit.set_param('max_unroll_recursion=-1') except: pass try: import sys sys.setrecursionlimit(10**7) except: pass from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum import heapq from bisect import bisect_left, bisect_right import copy from collections import deque,Counter,defaultdict from itertools import permutations,combinations from decimal import Decimal,ROUND_HALF_UP #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP) from functools import lru_cache, reduce #@lru_cache(maxsize=None) from operator import add,sub,mul,xor,and_,or_ INF = 10**18 mod1 = 10**9+7 mod2 = 998244353 #DecimalならPython H,W,La,Lb,Ka,Kb = map(int, input().split()) ans = 0 delete = 0 if H >= W: W2 = W while H > 0 and W2 > 0: ans += 1 W2 -= Lb delete += Kb H -= delete//W delete %= W while H > 0: ans += 1 H -= La delete += Ka H -= delete//W delete %= W else: H2 = H while W > 0 and H2 > 0: ans += 1 H2 -= La delete += Ka W -= delete//H delete %= H while W > 0: ans += 1 W -= Lb delete += Kb W -= delete//H delete %= H print(ans) if __name__ == '__main__': main()