結果

問題 No.18 うーさー暗号
ユーザー めうめう🎒めうめう🎒
提出日時 2016-05-08 18:51:50
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 2,289 ms
コンパイル使用メモリ 74,408 KB
実行使用メモリ 41,812 KB
最終ジャッジ日時 2024-04-15 13:52:52
合計ジャッジ時間 4,799 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
41,208 KB
testcase_01 AC 136 ms
41,456 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 129 ms
41,688 KB
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {	
	public String changeStr(String s){
		char[] c = s.toCharArray();
		for(int i = 0;i < s.length();i++){
			c[i] = (char)(c[i] - (i + 1));
			while(c[i] < 'A'){
				c[i] += 26;
			}
		}
		return String.valueOf(c);
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();
		String str = sc.next();
		System.out.println(m.changeStr(str));
		
	}
}
0