結果

問題 No.18 うーさー暗号
ユーザー komkomhkomkomh
提出日時 2019-06-07 22:06:37
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 298 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 15,489 ms
コンパイル使用メモリ 412,588 KB
実行使用メモリ 49,276 KB
最終ジャッジ日時 2023-08-13 02:26:33
合計ジャッジ時間 17,164 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 259 ms
49,276 KB
testcase_01 AC 262 ms
47,688 KB
testcase_02 AC 271 ms
47,556 KB
testcase_03 AC 295 ms
48,072 KB
testcase_04 AC 294 ms
47,908 KB
testcase_05 AC 288 ms
47,864 KB
testcase_06 AC 293 ms
47,856 KB
testcase_07 AC 294 ms
47,756 KB
testcase_08 AC 298 ms
47,804 KB
testcase_09 AC 296 ms
47,684 KB
testcase_10 AC 265 ms
47,760 KB
testcase_11 AC 272 ms
47,404 KB
testcase_12 AC 296 ms
48,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder

fun main() {
    var s = readLine()!!

    val bind: Int = 'Z' - 'A' + 1
    for (i in 0 until s.length) {
        val index = i % bind
        var c: Char = s[i] - index - 1
        while (c < 'A') {
            c += bind
        }
        print(c)
    }
    println()
}
0