結果

問題 No.740 幻の木
ユーザー stngstng
提出日時 2022-05-28 16:28:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,796 KB
実行使用メモリ 53,544 KB
最終ジャッジ日時 2023-10-20 23:13:42
合計ジャッジ時間 1,164 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,544 KB
testcase_01 AC 38 ms
53,544 KB
testcase_02 AC 39 ms
53,544 KB
testcase_03 AC 39 ms
53,544 KB
testcase_04 AC 38 ms
53,544 KB
testcase_05 AC 38 ms
53,544 KB
testcase_06 AC 38 ms
53,544 KB
testcase_07 AC 39 ms
53,544 KB
testcase_08 AC 38 ms
53,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p,q = map(int,input().split())
yr_num = (12+q)*m
yr = n // yr_num

n -= yr*yr_num

li = [m]*12
for i in range(q):
    li[p-1+i] += m

for i in range(12):
    if n <= 0:
        print(yr*12+i)
        exit()
    else:
        n -= li[i]
0