結果

問題 No.740 幻の木
ユーザー pypypymipypypymi
提出日時 2022-02-18 13:35:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 1,577 ms
コンパイル使用メモリ 86,576 KB
実行使用メモリ 75,936 KB
最終ジャッジ日時 2023-09-11 18:09:59
合計ジャッジ時間 1,872 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,048 KB
testcase_01 AC 74 ms
71,072 KB
testcase_02 AC 72 ms
71,308 KB
testcase_03 AC 72 ms
71,268 KB
testcase_04 AC 74 ms
71,060 KB
testcase_05 AC 74 ms
71,064 KB
testcase_06 AC 98 ms
75,936 KB
testcase_07 AC 74 ms
71,036 KB
testcase_08 AC 72 ms
71,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p,q = map(int,input().split())
month = list(range(1,13))
target = list(range(p,p+q))
index = 0
count=0
while n>0:
    #print(index)
    now_m = month[index]
    if now_m in target:
        n-=2*m
    else:
        n-=m
    index+=1
    index%=12
    count+=1
print(count)
    
0