結果

問題 No.740 幻の木
ユーザー kawacchukawacchu
提出日時 2019-10-10 19:54:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 281 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-08-14 01:55:05
合計ジャッジ時間 1,139 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,772 KB
testcase_01 AC 12 ms
7,828 KB
testcase_02 AC 13 ms
7,968 KB
testcase_03 AC 12 ms
7,872 KB
testcase_04 AC 12 ms
7,852 KB
testcase_05 AC 11 ms
7,800 KB
testcase_06 AC 281 ms
7,788 KB
testcase_07 AC 12 ms
7,872 KB
testcase_08 AC 12 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,P,Q = map(int,input().split())

A = []

for i in range(P,P+Q) :
    A.append(i)

ans = 0
c = 0
while N > 0 :
    ans += 1
    
    if c == 12 :
        c = 1
    else :
        c += 1
    
    if c in A :
        N -= 2*M
    else :
        N -= M

print(ans)
0