結果

問題 No.18 うーさー暗号
ユーザー spacenaut
提出日時 2016-05-15 22:30:02
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 1,922 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 56,480 KB
最終ジャッジ日時 2024-10-06 04:09:30
合計ジャッジ時間 4,309 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class No0013{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] st = new char[s.length()];

		for(int i = 0; i < s.length(); i++){
			st[i] = s.charAt(i);
			st[i] -= i + 1;
			if(st[i] < 'A'){
				while(st[i] < 'A'){
					st[i] += 26;
				}
			}
			if(st[i] > 'Z'){
				while(st[i] > 'Z'){
					st[i] += 26;
				}
			}
			System.out.print(st[i]);
		}
		System.out.println();
	}
}
0