結果

問題 No.18 うーさー暗号
ユーザー discoNekodiscoNeko
提出日時 2016-04-29 00:02:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 527 bytes
コンパイル時間 2,272 ms
コンパイル使用メモリ 71,772 KB
実行使用メモリ 49,452 KB
最終ジャッジ日時 2023-09-21 12:15:15
合計ジャッジ時間 3,056 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
49,288 KB
testcase_01 AC 38 ms
49,296 KB
testcase_02 AC 39 ms
49,348 KB
testcase_03 AC 41 ms
49,256 KB
testcase_04 AC 39 ms
49,416 KB
testcase_05 AC 39 ms
49,288 KB
testcase_06 AC 41 ms
49,452 KB
testcase_07 AC 41 ms
49,340 KB
testcase_08 AC 41 ms
49,320 KB
testcase_09 AC 40 ms
49,092 KB
testcase_10 AC 38 ms
49,368 KB
testcase_11 AC 39 ms
49,244 KB
testcase_12 AC 40 ms
47,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String a = br.readLine();
		int l = a.length();
		for(int i = 0; i < l; i++){
			char c = a.charAt(i);
			c -= (i+1)%26;
			if(c<'A')c += 26;
			sb.append(c);
		}
		System.out.println(sb);
	}
}
0