結果
問題 |
No.1335 1337
|
ユーザー |
![]() |
提出日時 | 2021-01-15 21:31:26 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 332 ms / 2,000 ms |
コード長 | 852 bytes |
コンパイル時間 | 14,464 ms |
コンパイル使用メモリ | 440,140 KB |
実行使用メモリ | 51,424 KB |
最終ジャッジ日時 | 2024-11-26 13:22:55 |
合計ジャッジ時間 | 18,909 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
コンパイルメッセージ
Main.kt:14:54: warning: 'toInt(): Int' is deprecated. Conversion of Char to Number is deprecated. Use Char.code property instead. if (Character.isDigit(c)) S[i] = A[c.toInt() - '0'.toInt()] ^ Main.kt:14:68: warning: 'toInt(): Int' is deprecated. Conversion of Char to Number is deprecated. Use Char.code property instead. if (Character.isDigit(c)) S[i] = A[c.toInt() - '0'.toInt()] ^
ソースコード
package yukicoder import java.util.* class Main(private val args : Array<String>) : Runnable { override fun run() { solve(args) } private fun solve(@Suppress("UNUSED_PARAMETER") args: Array<String>) { Scanner(System.`in`).use { sc -> val A = sc.next().toCharArray() val S = sc.next().toCharArray() for ((i, c) in S.withIndex()) { if (Character.isDigit(c)) S[i] = A[c.toInt() - '0'.toInt()] } println(S) } } } /** 確保するメモリの大きさ(単位: MB) */ private const val MEMORY: Long = 64 fun main(args: Array<String>) { Thread.setDefaultUncaughtExceptionHandler { _: Thread?, e: Throwable -> e.printStackTrace() System.exit(1) } Thread(null, Main(args = args), "", MEMORY * 1048576L).start() }