結果

問題 No.740 幻の木
ユーザー first_vilfirst_vil
提出日時 2020-08-02 10:43:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 372 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-18 08:46:12
合計ジャッジ時間 1,231 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p,q=map(int,input().split())
p-=1
ans=0
cur=0
while 0<n:
    if p<=cur and cur<p+q:
        n-=m*2
    else:
        n-=m
    ans+=1
    cur=(cur+1)%12
print(ans)
0