結果

問題 No.18 うーさー暗号
ユーザー core123core123
提出日時 2019-05-07 14:57:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 388 bytes
コンパイル時間 2,097 ms
コンパイル使用メモリ 71,936 KB
実行使用メモリ 55,752 KB
最終ジャッジ日時 2023-09-14 16:26:13
合計ジャッジ時間 4,940 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,488 KB
testcase_01 AC 124 ms
55,640 KB
testcase_02 AC 125 ms
55,752 KB
testcase_03 AC 128 ms
55,428 KB
testcase_04 AC 128 ms
55,604 KB
testcase_05 AC 127 ms
55,412 KB
testcase_06 AC 127 ms
55,680 KB
testcase_07 AC 124 ms
55,680 KB
testcase_08 AC 128 ms
55,452 KB
testcase_09 AC 127 ms
55,620 KB
testcase_10 AC 123 ms
55,652 KB
testcase_11 AC 125 ms
55,660 KB
testcase_12 AC 127 ms
55,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		String string=sc.next();
		StringBuilder sb=new StringBuilder();
		for(int i=0;i<string.length();i++) {
			sb.append((char)(((((string.charAt(i)-i-1-'A')%26)+26)%26)+'A'));
		}
		System.out.println(sb);

	}

}
0