結果

問題 No.18 うーさー暗号
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 03:52:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 163 ms / 5,000 ms
コード長 443 bytes
コンパイル時間 1,771 ms
コンパイル使用メモリ 71,708 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-09-21 12:33:17
合計ジャッジ時間 4,498 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,968 KB
testcase_01 AC 114 ms
56,072 KB
testcase_02 AC 119 ms
56,108 KB
testcase_03 AC 159 ms
56,204 KB
testcase_04 AC 134 ms
56,032 KB
testcase_05 AC 134 ms
55,888 KB
testcase_06 AC 158 ms
55,872 KB
testcase_07 AC 151 ms
56,024 KB
testcase_08 AC 163 ms
55,960 KB
testcase_09 AC 160 ms
56,188 KB
testcase_10 AC 121 ms
56,008 KB
testcase_11 AC 121 ms
55,784 KB
testcase_12 AC 153 ms
55,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        byte [] u = S.getBytes();
        for(int i=0; i<u.length; i++){
            int d = u[i] - (i+1);
            while(d<65){
                d = d+26;
            }
            char c = (char)d;
            System.out.print(c);
        }
        System.out.println();
    }
}
0