結果

問題 No.18 うーさー暗号
ユーザー GrenacheGrenache
提出日時 2015-09-22 22:35:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 5,675 ms
コンパイル使用メモリ 71,596 KB
実行使用メモリ 57,416 KB
最終ジャッジ日時 2023-09-21 11:53:30
合計ジャッジ時間 6,784 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
53,788 KB
testcase_01 AC 121 ms
55,644 KB
testcase_02 AC 122 ms
55,360 KB
testcase_03 AC 125 ms
55,360 KB
testcase_04 AC 126 ms
55,564 KB
testcase_05 AC 127 ms
55,640 KB
testcase_06 AC 125 ms
55,652 KB
testcase_07 AC 128 ms
55,664 KB
testcase_08 AC 125 ms
55,600 KB
testcase_09 AC 126 ms
55,964 KB
testcase_10 AC 121 ms
56,084 KB
testcase_11 AC 122 ms
57,416 KB
testcase_12 AC 124 ms
55,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder18 {

    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] - 'A' - i - 1 + 26 * 1024) % 26 + 'A');
        }

        System.out.println(new String(s));

        sc.close();
    }
}
0