結果

問題 No.5 数字のブロック
ユーザー 💕💖💞💕💖💞
提出日時 2017-07-01 14:53:39
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 9,627 ms
コンパイル使用メモリ 430,240 KB
実行使用メモリ 62,812 KB
最終ジャッジ日時 2024-04-30 15:13:36
合計ジャッジ時間 21,521 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 280 ms
60,368 KB
testcase_01 AC 277 ms
60,324 KB
testcase_02 WA -
testcase_03 AC 360 ms
60,476 KB
testcase_04 AC 329 ms
60,592 KB
testcase_05 AC 369 ms
62,708 KB
testcase_06 AC 345 ms
60,512 KB
testcase_07 AC 333 ms
60,540 KB
testcase_08 AC 357 ms
60,484 KB
testcase_09 AC 313 ms
60,504 KB
testcase_10 AC 365 ms
62,744 KB
testcase_11 AC 326 ms
60,440 KB
testcase_12 AC 359 ms
60,584 KB
testcase_13 AC 356 ms
60,600 KB
testcase_14 AC 280 ms
60,428 KB
testcase_15 AC 285 ms
60,484 KB
testcase_16 AC 368 ms
62,772 KB
testcase_17 AC 369 ms
62,788 KB
testcase_18 AC 375 ms
62,652 KB
testcase_19 AC 369 ms
62,812 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 281 ms
60,400 KB
testcase_24 AC 283 ms
60,352 KB
testcase_25 AC 290 ms
60,372 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 339 ms
60,624 KB
testcase_30 AC 312 ms
60,528 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:12: warning: parameter 'args' is never used
fun main(  args : Array<String> ) {
           ^
Main.kt:3:7: warning: variable 'n' is never used
  val n = readLine()!!.toInt()
      ^

ソースコード

diff #

fun main(  args : Array<String> ) {
  var l = readLine()!!.toInt()
  val n = readLine()!!.toInt()
  var cnt = 0
  for( s in readLine()!!.split(" ").map { it.toInt() }.sorted() ) {
    l   -= s
    cnt += 1
    if( l < 0 ) break    
  }
  println( cnt-1 )
}
0