結果

問題 No.18 うーさー暗号
ユーザー mits58mits58
提出日時 2016-07-02 00:23:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 5,000 ms
コード長 335 bytes
コンパイル時間 1,796 ms
コンパイル使用メモリ 71,708 KB
実行使用メモリ 58,076 KB
最終ジャッジ日時 2023-09-21 12:21:43
合計ジャッジ時間 4,434 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
55,888 KB
testcase_01 AC 110 ms
55,988 KB
testcase_02 AC 116 ms
56,048 KB
testcase_03 AC 153 ms
58,076 KB
testcase_04 AC 142 ms
55,880 KB
testcase_05 AC 133 ms
56,184 KB
testcase_06 AC 154 ms
56,312 KB
testcase_07 AC 155 ms
56,324 KB
testcase_08 AC 146 ms
55,940 KB
testcase_09 AC 154 ms
55,896 KB
testcase_10 AC 114 ms
55,868 KB
testcase_11 AC 116 ms
56,068 KB
testcase_12 AC 139 ms
56,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			String str=sc.next();
			for(int i=0;i<str.length();i++){
				int t=str.charAt(i)-'A'-i+25+26*100;
				t%=26;
				System.out.print((char)(t+'A'));
			}
			System.out.println();
		}
	}
}
0