結果

問題 No.501 穴と文字列
ユーザー 💕💖💞💕💖💞
提出日時 2017-06-25 17:29:33
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 314 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 11,658 ms
コンパイル使用メモリ 436,536 KB
実行使用メモリ 56,984 KB
最終ジャッジ日時 2024-04-30 14:55:05
合計ジャッジ時間 19,729 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 314 ms
56,836 KB
testcase_01 AC 310 ms
56,852 KB
testcase_02 AC 311 ms
56,928 KB
testcase_03 AC 303 ms
56,848 KB
testcase_04 AC 309 ms
56,808 KB
testcase_05 AC 309 ms
56,920 KB
testcase_06 AC 310 ms
56,832 KB
testcase_07 AC 310 ms
56,836 KB
testcase_08 AC 309 ms
56,904 KB
testcase_09 AC 309 ms
56,928 KB
testcase_10 AC 301 ms
56,908 KB
testcase_11 AC 306 ms
56,816 KB
testcase_12 AC 314 ms
56,792 KB
testcase_13 AC 314 ms
56,828 KB
testcase_14 AC 313 ms
56,864 KB
testcase_15 AC 305 ms
56,852 KB
testcase_16 AC 302 ms
56,836 KB
testcase_17 AC 309 ms
56,848 KB
testcase_18 AC 312 ms
56,836 KB
testcase_19 AC 312 ms
56,984 KB
testcase_20 AC 311 ms
56,852 KB
testcase_21 AC 311 ms
56,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:11: warning: parameter 'args' is never used
fun main( args : Array<String> ) { 
          ^
Main.kt:7:15: warning: the expression is unused
    else   -> null
              ^

ソースコード

diff #

fun main( args : Array<String> ) { 
  val (b, t) = readLine()!!.split(" ").map { x -> x.toInt() }
  when { 
    b == t -> println("A".repeat(b))
    b  < t -> println("A".repeat(b - (t-b)) + "B".repeat(t-b) ) 
    b  > t -> println("A".repeat(t)         + "C".repeat(b-t) )
    else   -> null
  }
}
0