結果

問題 No.522 Make Test Cases(テストケースを作る)
コンテスト
ユーザー 💕💖💞
提出日時 2017-06-24 16:33:52
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 1,070 ms / 2,000 ms
コード長 200 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 12,639 ms
コンパイル使用メモリ 458,656 KB
実行使用メモリ 92,920 KB
最終ジャッジ日時 2026-05-14 12:01:10
合計ジャッジ時間 18,702 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:4:13: warning: redundant call of conversion method.
  (1..(a/3).toInt() ).map { n ->
            ^^^^^^^
Main.kt:6:16: warning: redundant call of conversion method.
    (n..(nr/2).toInt() ).map { m ->
               ^^^^^^^

ソースコード

diff #
raw source code

fun main(args: Array<String>) {
  val a = readLine()!!.toInt()

  (1..(a/3).toInt() ).map { n ->
    val nr = a - n
    (n..(nr/2).toInt() ).map { m ->
       println("$n $m ${a - n -m}")
    }
  }
}
0