結果

問題 No.18 うーさー暗号
ユーザー suiginginsuigingin
提出日時 2015-07-07 01:43:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 172 ms / 5,000 ms
コード長 379 bytes
コンパイル時間 3,307 ms
コンパイル使用メモリ 73,688 KB
実行使用メモリ 57,196 KB
最終ジャッジ日時 2023-09-21 11:49:14
合計ジャッジ時間 6,334 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 152 ms
56,880 KB
testcase_01 AC 152 ms
57,196 KB
testcase_02 AC 152 ms
57,036 KB
testcase_03 AC 172 ms
56,820 KB
testcase_04 AC 165 ms
56,812 KB
testcase_05 AC 152 ms
56,748 KB
testcase_06 AC 166 ms
56,724 KB
testcase_07 AC 161 ms
56,900 KB
testcase_08 AC 159 ms
56,740 KB
testcase_09 AC 157 ms
56,964 KB
testcase_10 AC 152 ms
56,544 KB
testcase_11 AC 151 ms
57,004 KB
testcase_12 AC 152 ms
54,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No_018 {
	Scanner sc = new Scanner(System.in);

	void run() {
		String s = sc.next();
		String t = "";
		for (int i = 1; i <= s.length(); i++) {
			int move = s.charAt(i - 1) - (i % 26);
			if (move < 65) move += 26;
			t += (char) move;
		}
		System.out.println(t);
	}

	public static void main(String[] args) {
		new No_018().run();
	}
}
0