結果

問題 No.18 うーさー暗号
ユーザー lrf141lrf141
提出日時 2017-03-06 17:25:24
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 984 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 8,680 ms
コンパイル使用メモリ 257,248 KB
実行使用メモリ 62,176 KB
最終ジャッジ日時 2023-09-12 11:15:29
合計ジャッジ時間 22,880 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 931 ms
61,672 KB
testcase_01 AC 942 ms
61,748 KB
testcase_02 AC 936 ms
61,540 KB
testcase_03 AC 983 ms
61,820 KB
testcase_04 AC 980 ms
62,084 KB
testcase_05 AC 973 ms
61,916 KB
testcase_06 AC 973 ms
61,848 KB
testcase_07 AC 979 ms
61,760 KB
testcase_08 AC 984 ms
62,028 KB
testcase_09 AC 971 ms
62,176 KB
testcase_10 AC 934 ms
62,076 KB
testcase_11 AC 927 ms
62,012 KB
testcase_12 AC 971 ms
62,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.{BufferedReader,InputStreamReader}
object no18{
    def main(args:Array[String]):Unit={
        val br = new BufferedReader(new InputStreamReader(System.in))
        val s = br.readLine().zipWithIndex
        val res = s.map{
             case (c,i) => 
             val a = (((c-'A')-(i+1))%26+26)%26
             (a+'A').toChar
        }
        res.foreach(print _)
        println()
    }
}
0