結果

問題 No.740 幻の木
ユーザー ddsyg1ddsyg1
提出日時 2019-01-15 10:56:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 76,120 KB
最終ジャッジ日時 2023-09-06 14:38:43
合計ジャッジ時間 1,501 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,136 KB
testcase_01 AC 62 ms
71,640 KB
testcase_02 AC 59 ms
71,480 KB
testcase_03 AC 62 ms
71,332 KB
testcase_04 AC 60 ms
71,340 KB
testcase_05 AC 61 ms
71,412 KB
testcase_06 AC 73 ms
76,120 KB
testcase_07 AC 60 ms
71,248 KB
testcase_08 AC 62 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m,n,p,q = map(int, input().split())
cnt = 0
while m > 0:
    for month in range(12):
        cnt += 1

        m -= n
        if(month+1 >= p and month+1 <= p+q-1):
            m -= n
        #print(m)
        if m <= 0:
            print(cnt)
            break
0