結果

問題 No.501 穴と文字列
ユーザー 💕💖💞💕💖💞
提出日時 2017-06-25 17:26:41
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 9,968 ms
コンパイル使用メモリ 435,308 KB
実行使用メモリ 57,096 KB
最終ジャッジ日時 2024-04-30 14:52:58
合計ジャッジ時間 17,079 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 279 ms
56,836 KB
testcase_02 WA -
testcase_03 AC 262 ms
56,948 KB
testcase_04 AC 265 ms
56,936 KB
testcase_05 WA -
testcase_06 AC 266 ms
56,844 KB
testcase_07 AC 270 ms
56,892 KB
testcase_08 AC 272 ms
56,876 KB
testcase_09 AC 265 ms
56,920 KB
testcase_10 WA -
testcase_11 AC 265 ms
56,820 KB
testcase_12 AC 266 ms
56,968 KB
testcase_13 AC 261 ms
56,848 KB
testcase_14 WA -
testcase_15 AC 273 ms
56,996 KB
testcase_16 AC 278 ms
57,076 KB
testcase_17 AC 281 ms
57,064 KB
testcase_18 WA -
testcase_19 AC 274 ms
56,856 KB
testcase_20 WA -
testcase_21 AC 268 ms
56,820 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(b - t)     + "C".repeat(t) )
    else   -> null
  }
}
0