結果

問題 No.1335 1337
ユーザー 👑 箱星箱星
提出日時 2021-01-15 21:21:48
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 757 bytes
コンパイル時間 11,876 ms
コンパイル使用メモリ 433,320 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-05-04 22:29:34
合計ジャッジ時間 17,685 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 253 ms
54,144 KB
testcase_01 AC 245 ms
54,252 KB
testcase_02 AC 251 ms
54,200 KB
testcase_03 AC 254 ms
54,280 KB
testcase_04 AC 262 ms
54,416 KB
testcase_05 AC 258 ms
54,152 KB
testcase_06 AC 257 ms
54,104 KB
testcase_07 AC 259 ms
54,316 KB
testcase_08 AC 259 ms
54,168 KB
testcase_09 AC 253 ms
54,152 KB
testcase_10 AC 259 ms
54,196 KB
testcase_11 AC 245 ms
54,044 KB
testcase_12 AC 243 ms
54,116 KB
testcase_13 AC 254 ms
54,164 KB
testcase_14 AC 253 ms
54,128 KB
testcase_15 AC 256 ms
54,164 KB
testcase_16 AC 251 ms
54,272 KB
testcase_17 AC 253 ms
54,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.util.*
import kotlin.math.*

fun PrintWriter.solve() {
    val a = nextLine()
    val s = nextLine()
    for (c in s) {
        if (c in '0'..'9') {
            print(a[c - '0'])
        } else {
            print(c)
        }
    }
    println()
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve()
    writer.flush()
}

// region Scanner
private var st = StringTokenizer("")
private val br = System.`in`.bufferedReader()

fun next(): String {
    while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())
    return st.nextToken()
}

fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextLine() = br.readLine()!!
fun nextDouble() = next().toDouble()
// endregion
0