結果

問題 No.746 7の倍数
ユーザー javyjavy
提出日時 2018-10-24 15:32:22
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 473 ms / 2,000 ms
コード長 1,401 bytes
コンパイル時間 12,832 ms
コンパイル使用メモリ 437,192 KB
実行使用メモリ 61,180 KB
最終ジャッジ日時 2024-04-30 19:30:29
合計ジャッジ時間 21,251 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 277 ms
54,136 KB
testcase_01 AC 275 ms
54,244 KB
testcase_02 AC 280 ms
54,136 KB
testcase_03 AC 473 ms
60,956 KB
testcase_04 AC 313 ms
54,428 KB
testcase_05 AC 310 ms
54,332 KB
testcase_06 AC 420 ms
61,112 KB
testcase_07 AC 331 ms
54,516 KB
testcase_08 AC 419 ms
61,108 KB
testcase_09 AC 336 ms
54,480 KB
testcase_10 AC 315 ms
54,452 KB
testcase_11 AC 419 ms
61,076 KB
testcase_12 AC 445 ms
61,112 KB
testcase_13 AC 436 ms
61,096 KB
testcase_14 AC 465 ms
61,108 KB
testcase_15 AC 427 ms
61,024 KB
testcase_16 AC 463 ms
61,164 KB
testcase_17 AC 425 ms
61,180 KB
testcase_18 AC 426 ms
61,108 KB
testcase_19 AC 414 ms
61,036 KB
testcase_20 AC 337 ms
54,640 KB
testcase_21 AC 314 ms
54,536 KB
testcase_22 AC 425 ms
61,016 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