結果

問題 No.740 幻の木
ユーザー nebukuro09nebukuro09
提出日時 2018-10-05 21:24:11
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 1,370 ms
コンパイル使用メモリ 77,448 KB
実行使用メモリ 78,580 KB
最終ジャッジ日時 2023-08-02 16:51:08
合計ジャッジ時間 2,773 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
76,344 KB
testcase_01 AC 75 ms
76,548 KB
testcase_02 AC 73 ms
76,016 KB
testcase_03 AC 73 ms
76,048 KB
testcase_04 AC 74 ms
76,252 KB
testcase_05 AC 72 ms
76,264 KB
testcase_06 AC 95 ms
78,580 KB
testcase_07 AC 72 ms
76,620 KB
testcase_08 AC 73 ms
76,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, P, Q = map(int, raw_input().split())
m = 1
ans = 0
while N > 0:
    if P <= m and m < P + Q:
        N -= 2 * M
    else:
        N -= M
    ans += 1
    m = (m + 1) % 12
    if m == 0:
        m = 12
print ans
0