結果

問題 No.18 うーさー暗号
ユーザー jp_stejp_ste
提出日時 2016-02-18 06:37:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 1,792 ms
コンパイル使用メモリ 71,812 KB
実行使用メモリ 56,076 KB
最終ジャッジ日時 2023-09-21 12:08:04
合計ジャッジ時間 4,131 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
55,484 KB
testcase_01 AC 116 ms
55,960 KB
testcase_02 AC 113 ms
55,468 KB
testcase_03 AC 125 ms
55,852 KB
testcase_04 AC 119 ms
55,704 KB
testcase_05 AC 120 ms
56,020 KB
testcase_06 AC 129 ms
56,020 KB
testcase_07 AC 125 ms
55,700 KB
testcase_08 AC 123 ms
56,036 KB
testcase_09 AC 123 ms
55,792 KB
testcase_10 AC 115 ms
56,076 KB
testcase_11 AC 116 ms
56,032 KB
testcase_12 AC 124 ms
55,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		
		char[] out = S.toCharArray();
		for(int i=0; i<S.length(); i++) {
			for(int j=0; j<i+1; j++) {
				out[i]--;
				if(out[i] < 'A') out[i] = 'Z';
			}
		}
		System.out.println(out);
	}
}
0