結果
| 問題 | No.78 クジ付きアイスバー |
| コンテスト | |
| ユーザー |
Watson
|
| 提出日時 | 2017-07-25 10:27:52 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-12 17:54:41 |
| 合計ジャッジ時間 | 9,296 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 1 TLE * 1 -- * 33 |
ソースコード
N,K = [int(i) for i in input().split()]
S = list(input())
buy = 1
eat = 1
atari = int(S[0])
box = 1
while eat < K:
if atari >= 1:
atari += int(S[box])
box += 1
eat+= 1
atari -= 1
elif atari == 0:
atari += int(S[box])
eat += 1
buy += 1
box += 1
if box >= N:
box -= N
print(buy)
Watson