結果

問題 No.18 うーさー暗号
ユーザー SuunnSuunn
提出日時 2018-11-20 04:52:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 154 ms / 5,000 ms
コード長 376 bytes
コンパイル時間 2,465 ms
コンパイル使用メモリ 71,856 KB
実行使用メモリ 56,488 KB
最終ジャッジ日時 2023-08-26 02:09:14
合計ジャッジ時間 4,878 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
56,092 KB
testcase_01 AC 101 ms
55,952 KB
testcase_02 AC 106 ms
56,204 KB
testcase_03 AC 142 ms
56,440 KB
testcase_04 AC 138 ms
56,212 KB
testcase_05 AC 131 ms
56,224 KB
testcase_06 AC 141 ms
56,148 KB
testcase_07 AC 143 ms
56,124 KB
testcase_08 AC 133 ms
55,984 KB
testcase_09 AC 134 ms
56,292 KB
testcase_10 AC 108 ms
56,176 KB
testcase_11 AC 107 ms
56,124 KB
testcase_12 AC 154 ms
56,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
	

public class Main{
	
	
	public static void main(String args[])throws Exception{
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int L = S.length();
		char[] retu = new char[26];
		for(char c='A';c<='Z';c++){
			retu[c-'A'] = c;
		}
		for(int i=0;i<L;i++){
			System.out.print(retu[(S.charAt(i)-'A'-(i+1)+L*26)%26]);
		}
	}
	
}
0