結果

問題 No.156 キャンディー・ボックス
ユーザー tarotaro789tarotaro789
提出日時 2021-02-13 01:03:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 12,596 KB
最終ジャッジ日時 2023-09-27 08:30:02
合計ジャッジ時間 8,566 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
7,952 KB
testcase_01 WA -
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 16 ms
7,864 KB
testcase_04 AC 16 ms
7,840 KB
testcase_05 WA -
testcase_06 AC 222 ms
7,848 KB
testcase_07 AC 183 ms
7,832 KB
testcase_08 AC 178 ms
7,848 KB
testcase_09 AC 130 ms
7,820 KB
testcase_10 AC 191 ms
7,828 KB
testcase_11 AC 156 ms
7,756 KB
testcase_12 AC 204 ms
7,836 KB
testcase_13 AC 145 ms
7,844 KB
testcase_14 AC 151 ms
7,796 KB
testcase_15 AC 181 ms
7,904 KB
testcase_16 AC 136 ms
7,948 KB
testcase_17 AC 157 ms
7,796 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 24 ms
7,832 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 16 ms
7,920 KB
testcase_25 AC 15 ms
7,776 KB
testcase_26 AC 15 ms
7,784 KB
testcase_27 AC 15 ms
7,848 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,824 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 TLE -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

box,toru=map(int,input().split())
ls=[int(i) for i in input().split()]
ls.sort()

flg=0
while True:
     for i in range(len(ls)):
          if ls[i]!=0:
               ls[i]-=1
               toru-=1
          if toru==0:
               flg=1
               break
     if flg==1:
          break
     
print(ls.count(0))
0