結果
| 問題 | No.740 幻の木 | 
| コンテスト | |
| ユーザー |  convexineq | 
| 提出日時 | 2021-03-19 17:00:01 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 37 ms / 2,000 ms | 
| コード長 | 180 bytes | 
| コンパイル時間 | 294 ms | 
| コンパイル使用メモリ | 81,860 KB | 
| 実行使用メモリ | 52,936 KB | 
| 最終ジャッジ日時 | 2024-11-18 11:48:02 | 
| 合計ジャッジ時間 | 1,181 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 6 | 
ソースコード
n,m,p,q = map(int,input().split())
x = (n+m-1)//m
t = 12 + q
ans = x//t*12
x %= t
for i in range(1,13):
    x -= 2 if p <= i < p+q else 1
    ans += 1
    if x<=0: break
print(ans)
            
            
            
        