結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー 💕💖💞💕💖💞
提出日時 2017-06-24 16:09:53
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 300 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 12,688 ms
コンパイル使用メモリ 421,172 KB
実行使用メモリ 54,956 KB
最終ジャッジ日時 2023-08-12 19:18:02
合計ジャッジ時間 22,470 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 296 ms
53,008 KB
testcase_01 AC 298 ms
52,896 KB
testcase_02 AC 297 ms
52,764 KB
testcase_03 AC 294 ms
52,780 KB
testcase_04 AC 300 ms
52,900 KB
testcase_05 AC 293 ms
52,736 KB
testcase_06 AC 290 ms
52,764 KB
testcase_07 AC 297 ms
54,956 KB
testcase_08 AC 299 ms
52,740 KB
testcase_09 AC 288 ms
53,232 KB
testcase_10 AC 298 ms
52,892 KB
testcase_11 AC 290 ms
52,744 KB
testcase_12 AC 288 ms
52,968 KB
testcase_13 AC 290 ms
52,820 KB
testcase_14 AC 292 ms
52,948 KB
testcase_15 AC 293 ms
53,080 KB
testcase_16 AC 287 ms
52,936 KB
testcase_17 AC 292 ms
54,636 KB
testcase_18 AC 291 ms
52,744 KB
testcase_19 AC 296 ms
52,828 KB
testcase_20 AC 288 ms
52,756 KB
testcase_21 AC 287 ms
52,864 KB
testcase_22 AC 292 ms
52,776 KB
testcase_23 AC 296 ms
52,928 KB
testcase_24 AC 297 ms
53,164 KB
testcase_25 AC 293 ms
52,840 KB
testcase_26 AC 292 ms
53,080 KB
testcase_27 AC 294 ms
53,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
  val (m,n) = readLine()!!.split(" ").map { x -> x.toLong() }
  if( m >= n && 1 <= n ) {
    if( m + 1L == n * 2L )
      println(m - 1L)
    else
      println(m - 2L)
  } else {
    println(0)
  }
}
0