結果
| 問題 | No.740 幻の木 |
| コンテスト | |
| ユーザー |
sobasssy
|
| 提出日時 | 2019-01-07 17:02:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 326 ms / 2,000 ms |
| コード長 | 474 bytes |
| 記録 | |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-24 00:28:25 |
| 合計ジャッジ時間 | 1,407 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 |
ソースコード
chars = input().split(" ")
leaves = int(chars[0])
per_lost = int(chars[1])
month_list = []
for x in range(int(chars[2]), int(chars[2]) + int(chars[3])):
month_list.append(x)
if 12 in month_list:
month_list.remove(12)
month_list.append(0)
counter = 0
while True:
if leaves <= 0:
print(counter)
break
else:
counter += 1
if (counter % 12) in month_list:
leaves -= per_lost * 2
else:
leaves -= per_lost
sobasssy