結果

問題 No.740 幻の木
ユーザー brthyyjpbrthyyjp
提出日時 2021-06-14 21:22:51
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 76,116 KB
最終ジャッジ日時 2023-08-26 06:47:20
合計ジャッジ時間 1,655 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,524 KB
testcase_01 AC 70 ms
71,328 KB
testcase_02 AC 70 ms
71,376 KB
testcase_03 AC 71 ms
71,452 KB
testcase_04 AC 73 ms
71,340 KB
testcase_05 AC 69 ms
71,304 KB
testcase_06 AC 83 ms
76,116 KB
testcase_07 AC 71 ms
71,204 KB
testcase_08 AC 72 ms
71,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, p, q = map(int, input().split())
for i in range(1, n+1):
    j = i
    i %= 12
    if i == 0:
        i = 12
    if p <= i <= p+q-1:
        n -= 2*m
    else:
        n -= m
    if n <= 0:
        print(j)
        exit()
0