結果

問題 No.18 うーさー暗号
ユーザー Natsume-MNatsume-M
提出日時 2016-11-28 18:01:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 1,765 ms
コンパイル使用メモリ 71,320 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2023-09-21 12:33:54
合計ジャッジ時間 4,152 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
53,816 KB
testcase_01 AC 110 ms
55,616 KB
testcase_02 AC 118 ms
55,956 KB
testcase_03 AC 121 ms
55,700 KB
testcase_04 AC 121 ms
55,644 KB
testcase_05 AC 123 ms
55,528 KB
testcase_06 AC 123 ms
55,840 KB
testcase_07 AC 122 ms
55,788 KB
testcase_08 AC 123 ms
55,868 KB
testcase_09 AC 113 ms
55,988 KB
testcase_10 AC 109 ms
55,604 KB
testcase_11 AC 110 ms
55,588 KB
testcase_12 AC 112 ms
56,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class y18 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        for (int i=0; i<s.length; i++) {
        	s[i] = (char)(((s[i]-66-i)%26+26)%26+65);
        }
        System.out.println(String.valueOf(s));
    }
}
0