結果

問題 No.740 幻の木
コンテスト
ユーザー bellangeldindon
提出日時 2019-05-17 14:45:22
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 55 ms / 2,000 ms
+ 253µs
コード長 224 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 67 ms
コンパイル使用メモリ 81,280 KB
実行使用メモリ 81,920 KB
最終ジャッジ日時 2026-07-18 20:01:33
合計ジャッジ時間 1,865 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M, P, Q = map(int, raw_input().split())
fallleaf = [M, M, M, M, M, M, M, M, M, M, M, M]
for i in range(P, P+Q):
	fallleaf[i%12] += M
month = 1
while True:
	N -= fallleaf[month%12]
	if N <= 0: break
	month += 1
print month
0