結果

問題 No.740 幻の木
ユーザー nebukuro09nebukuro09
提出日時 2018-10-05 21:24:11
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 1,576 ms
コンパイル使用メモリ 76,672 KB
実行使用メモリ 77,312 KB
最終ジャッジ日時 2024-04-20 16:57:11
合計ジャッジ時間 2,939 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
75,520 KB
testcase_01 AC 82 ms
75,392 KB
testcase_02 AC 82 ms
75,264 KB
testcase_03 AC 82 ms
75,264 KB
testcase_04 AC 81 ms
75,648 KB
testcase_05 AC 81 ms
75,264 KB
testcase_06 AC 110 ms
77,312 KB
testcase_07 AC 83 ms
75,648 KB
testcase_08 AC 87 ms
75,776 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