結果

問題 No.112 ややこしい鶴亀算
ユーザー 👑 yumechiyumechi
提出日時 2015-06-12 03:35:57
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 15,481 ms
コンパイル使用メモリ 429,416 KB
実行使用メモリ 57,092 KB
最終ジャッジ日時 2024-04-30 02:40:41
合計ジャッジ時間 21,554 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
51,812 KB
testcase_01 AC 316 ms
51,768 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 322 ms
51,808 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 317 ms
51,740 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 320 ms
51,772 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 319 ms
51,844 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^
Main.kt:2:7: warning: variable 'N' is never used
  var N = readLine()!!.map { it.toInt() }
      ^
Main.kt:2:33: warning: 'toInt(): Int' is deprecated. Conversion of Char to Number is deprecated. Use Char.code property instead.
  var N = readLine()!!.map { it.toInt() }
                                ^

ソースコード

diff #

fun main(args : Array<String>) {
  var N = readLine()!!.map { it.toInt() }
  var arr = readLine()!!.split(" ").map { it.toInt() }
  var turu = 0
  var kame = 0
  for(a in arr) {
    if(a == 4) {
      turu++;
    } else {
      kame++;
    }
  }
  
  println("${turu} ${kame}");
}
0