結果

問題 No.746 7の倍数
ユーザー javyjavy
提出日時 2018-10-24 15:32:22
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 478 ms / 2,000 ms
コード長 1,401 bytes
コンパイル時間 12,987 ms
コンパイル使用メモリ 417,488 KB
実行使用メモリ 58,864 KB
最終ジャッジ日時 2023-08-13 00:53:46
合計ジャッジ時間 23,352 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 262 ms
50,144 KB
testcase_01 AC 267 ms
49,972 KB
testcase_02 AC 266 ms
50,088 KB
testcase_03 AC 478 ms
58,680 KB
testcase_04 AC 299 ms
50,724 KB
testcase_05 AC 300 ms
50,488 KB
testcase_06 AC 412 ms
58,728 KB
testcase_07 AC 327 ms
52,468 KB
testcase_08 AC 412 ms
58,516 KB
testcase_09 AC 328 ms
52,464 KB
testcase_10 AC 298 ms
50,792 KB
testcase_11 AC 421 ms
58,864 KB
testcase_12 AC 441 ms
58,592 KB
testcase_13 AC 411 ms
58,736 KB
testcase_14 AC 424 ms
58,776 KB
testcase_15 AC 407 ms
58,800 KB
testcase_16 AC 427 ms
58,740 KB
testcase_17 AC 412 ms
58,752 KB
testcase_18 AC 423 ms
58,684 KB
testcase_19 AC 408 ms
58,748 KB
testcase_20 AC 325 ms
52,548 KB
testcase_21 AC 305 ms
50,684 KB
testcase_22 AC 435 ms
58,572 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

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 readLineString() : String {
        return readLine() as String
    }

    //    fun readLineStringArray(): List<String> {
    //        val str = readLine() as String
    //        val arrStr = str.split(" ")
    //        return arrStr
    //    }
    val str = "142857"
    val n = readLineInt()
    print("0")
    if (n == 0) {
        println()
        return
    }
    print(".")
    for (i in 1..(n/6)) {
        print(str)
    }
    println(str.substring(0, n%6) )
}
0