結果

問題 No.499 7進数変換
ユーザー nobigomunobigomu
提出日時 2018-06-04 19:18:43
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 259 ms / 1,000 ms
コード長 189 bytes
コンパイル時間 9,449 ms
コンパイル使用メモリ 424,576 KB
実行使用メモリ 54,400 KB
最終ジャッジ日時 2024-04-30 18:33:52
合計ジャッジ時間 18,497 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 248 ms
54,140 KB
testcase_01 AC 254 ms
54,124 KB
testcase_02 AC 248 ms
54,248 KB
testcase_03 AC 252 ms
54,196 KB
testcase_04 AC 258 ms
54,256 KB
testcase_05 AC 252 ms
54,208 KB
testcase_06 AC 255 ms
54,400 KB
testcase_07 AC 251 ms
54,096 KB
testcase_08 AC 255 ms
54,220 KB
testcase_09 AC 249 ms
54,324 KB
testcase_10 AC 254 ms
54,256 KB
testcase_11 AC 243 ms
54,272 KB
testcase_12 AC 246 ms
54,192 KB
testcase_13 AC 243 ms
54,196 KB
testcase_14 AC 240 ms
54,320 KB
testcase_15 AC 256 ms
54,128 KB
testcase_16 AC 248 ms
54,104 KB
testcase_17 AC 247 ms
54,316 KB
testcase_18 AC 247 ms
54,236 KB
testcase_19 AC 248 ms
54,168 KB
testcase_20 AC 254 ms
54,352 KB
testcase_21 AC 247 ms
54,124 KB
testcase_22 AC 259 ms
54,104 KB
testcase_23 AC 258 ms
54,144 KB
testcase_24 AC 246 ms
54,140 KB
testcase_25 AC 243 ms
54,144 KB
testcase_26 AC 244 ms
54,120 KB
testcase_27 AC 247 ms
54,132 KB
testcase_28 AC 239 ms
54,184 KB
testcase_29 AC 256 ms
54,232 KB
testcase_30 AC 259 ms
54,252 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

tailrec fun f(n: Int, s: String): String = if (n>0) f(n/7,(n%7).toString()+s) else s
fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    println(if (n==0) n else f(n,""))
}
0