結果

問題 No.83 最大マッチング
ユーザー javyjavy
提出日時 2015-12-01 10:10:57
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 473 ms / 5,000 ms
コード長 1,266 bytes
コンパイル時間 12,649 ms
コンパイル使用メモリ 419,300 KB
実行使用メモリ 60,888 KB
最終ジャッジ日時 2023-08-12 16:36:39
合計ジャッジ時間 17,210 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 250 ms
50,340 KB
testcase_01 AC 241 ms
50,188 KB
testcase_02 AC 241 ms
50,244 KB
testcase_03 AC 251 ms
50,308 KB
testcase_04 AC 244 ms
50,344 KB
testcase_05 AC 246 ms
50,092 KB
testcase_06 AC 240 ms
50,192 KB
testcase_07 AC 240 ms
50,220 KB
testcase_08 AC 234 ms
50,064 KB
testcase_09 AC 360 ms
58,584 KB
testcase_10 AC 455 ms
58,728 KB
testcase_11 AC 471 ms
60,888 KB
testcase_12 AC 473 ms
60,832 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

fun main(args: Array<String>) {
    fun readLineLongArray(): List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }

    fun readLineLong(): Long {
        val str = readLine() as String
        return str.toLong()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    fun readLineDoubleArray(): List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }

    fun readLineDouble() : Double {
        val str = readLine() as String
        return str.toDouble()
    }


//    fun readLineStringArray(): List<String> {
//        val str = readLine() as String
//        val arrStr = str.split(" ")
//        return arrStr
//    }

    var num = readLineInt()
    if (num % 2 == 1) {
        print(7)
        num -= 3
    }
    for (i in num downTo 2 step 2) {
        print(1)
    }
    println()
}
0