結果

問題 No.18 うーさー暗号
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-24 00:20:09
言語 Java19
(openjdk 21)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 471 bytes
コンパイル時間 3,579 ms
コンパイル使用メモリ 71,584 KB
実行使用メモリ 49,652 KB
最終ジャッジ日時 2023-09-21 12:52:25
合計ジャッジ時間 4,121 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
49,496 KB
testcase_01 AC 38 ms
49,300 KB
testcase_02 AC 38 ms
49,652 KB
testcase_03 AC 39 ms
49,360 KB
testcase_04 AC 39 ms
47,144 KB
testcase_05 AC 39 ms
49,368 KB
testcase_06 AC 41 ms
49,164 KB
testcase_07 AC 39 ms
49,164 KB
testcase_08 AC 39 ms
49,144 KB
testcase_09 AC 39 ms
49,444 KB
testcase_10 AC 38 ms
49,172 KB
testcase_11 AC 38 ms
49,232 KB
testcase_12 AC 39 ms
49,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No18{
	public static void main(String args[]) throws IOException{
		String str = new BufferedReader(new InputStreamReader(System.in)).readLine();
		byte[] inputToNum = str.getBytes();
		for(int i=0; i<str.length(); i++){
			inputToNum[i] -= (i+1) % 26;
			if(inputToNum[i] < 65){
				inputToNum[i] += 26;
			}
		}
		System.out.println(new String(inputToNum));
	}
}
0