結果

問題 No.18 うーさー暗号
ユーザー k_kadorak_kadora
提出日時 2015-06-11 00:36:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 320 bytes
コンパイル時間 3,303 ms
コンパイル使用メモリ 72,976 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-09-21 11:48:27
合計ジャッジ時間 5,806 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,776 KB
testcase_01 AC 127 ms
55,844 KB
testcase_02 AC 118 ms
55,936 KB
testcase_03 AC 119 ms
55,884 KB
testcase_04 AC 118 ms
56,424 KB
testcase_05 AC 118 ms
55,492 KB
testcase_06 AC 119 ms
55,752 KB
testcase_07 AC 121 ms
56,004 KB
testcase_08 AC 118 ms
55,932 KB
testcase_09 AC 117 ms
55,628 KB
testcase_10 AC 116 ms
55,812 KB
testcase_11 AC 114 ms
55,624 KB
testcase_12 AC 117 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Usa{
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		char temp;
		char[] c = sc.next().toCharArray();
		for(int i = 0;i<c.length;i++){
			c[i] -= (i+1)%('Z'-'A' + 1);
			if(c[i]<'A')c[i]+='Z'-'A'+1;
		}
		System.out.println(String.valueOf(c));
	}
}
0