結果

問題 No.740 幻の木
ユーザー toyuzukotoyuzuko
提出日時 2020-06-09 16:45:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 313 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 1,418 ms
コンパイル使用メモリ 10,496 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-08-30 17:07:13
合計ジャッジ時間 2,534 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,780 KB
testcase_01 AC 15 ms
7,760 KB
testcase_02 AC 15 ms
7,972 KB
testcase_03 AC 15 ms
7,932 KB
testcase_04 AC 15 ms
7,696 KB
testcase_05 AC 15 ms
7,924 KB
testcase_06 AC 313 ms
7,796 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 15 ms
7,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, P, Q = map(int, input().split())
res = 0
while True:
    for i in range(1, 13):
        res += 1
        if P <= i < P + Q:
            N -= 2 * M
        else:
            N -= M
        if N <= 0:
            print(res)
            break
    else:
        continue
    break
0