結果

問題 No.501 穴と文字列
ユーザー 💕💖💞
提出日時 2017-06-25 17:29:33
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 323 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 11,337 ms
コンパイル使用メモリ 436,024 KB
実行使用メモリ 56,916 KB
最終ジャッジ日時 2024-11-20 10:36:24
合計ジャッジ時間 19,548 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
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