結果

問題 No.1335 1337
ユーザー 👑 箱
提出日時 2021-01-15 21:21:48
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 274 ms / 2,000 ms
コード長 757 bytes
コンパイル時間 15,291 ms
コンパイル使用メモリ 421,692 KB
実行使用メモリ 50,328 KB
最終ジャッジ日時 2023-08-17 15:48:35
合計ジャッジ時間 22,109 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 260 ms
50,104 KB
testcase_01 AC 257 ms
50,092 KB
testcase_02 AC 257 ms
50,328 KB
testcase_03 AC 258 ms
50,064 KB
testcase_04 AC 261 ms
50,080 KB
testcase_05 AC 254 ms
50,144 KB
testcase_06 AC 256 ms
50,080 KB
testcase_07 AC 263 ms
50,048 KB
testcase_08 AC 262 ms
50,144 KB
testcase_09 AC 263 ms
49,916 KB
testcase_10 AC 266 ms
49,948 KB
testcase_11 AC 265 ms
49,988 KB
testcase_12 AC 265 ms
50,236 KB
testcase_13 AC 267 ms
50,072 KB
testcase_14 AC 274 ms
50,056 KB
testcase_15 AC 260 ms
49,976 KB
testcase_16 AC 267 ms
50,044 KB
testcase_17 AC 270 ms
49,976 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