結果

問題 No.701 ひとりしりとり
ユーザー 💕💖💞💕💖💞
提出日時 2018-06-16 03:26:17
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 597 bytes
コンパイル時間 13,107 ms
コンパイル使用メモリ 438,260 KB
実行使用メモリ 94,736 KB
最終ジャッジ日時 2024-04-30 18:54:35
合計ジャッジ時間 16,625 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 284 ms
60,212 KB
testcase_02 AC 280 ms
60,344 KB
testcase_03 AC 285 ms
60,256 KB
testcase_04 AC 282 ms
60,240 KB
testcase_05 AC 278 ms
60,276 KB
testcase_06 AC 280 ms
60,296 KB
testcase_07 AC 289 ms
60,316 KB
testcase_08 AC 289 ms
60,264 KB
testcase_09 AC 315 ms
60,220 KB
testcase_10 AC 421 ms
66,880 KB
testcase_11 AC 679 ms
94,736 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
  val n = readLine()!!.toInt()
  val runes = "abcdefghijklmnopqrstuvwxyz".toList().map(Char::toString)

  val buffs = mutableListOf<String>("an")
  
  var c = 0
  l1@for( c1 in (0..runes.size-1 ) ) {
    for( c2 in (0..runes.size-1 ) ) {
      for( c3 in (0..runes.size-1 ) ) {
        for( c4 in (0..runes.size-1 ) ) {
          var numstr = "a" + listOf(c1,c2,c3,c4).map{ runes[it] }.joinToString("") + "a" 
          buffs.add(numstr)
          c++
          if(c >= n-1) break@l1
        }
      }
    }
  }
  buffs.reversed().joinToString("\n").run(::println)
}
0