結果

問題 No.18 うーさー暗号
ユーザー shinwisteriashinwisteria
提出日時 2018-03-04 17:52:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 4,493 ms
コンパイル使用メモリ 75,048 KB
実行使用メモリ 55,932 KB
最終ジャッジ日時 2023-09-22 17:04:30
合計ジャッジ時間 7,345 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,680 KB
testcase_01 AC 117 ms
55,712 KB
testcase_02 AC 119 ms
55,712 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 118 ms
55,752 KB
testcase_11 AC 119 ms
55,740 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con18 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String str = s.nextLine();
		s.close();

		byte[] sbyte = str.getBytes();
		for(int i = 0;i < sbyte.length;i++){
			sbyte[i] -= (64 + i + 1);
			while(sbyte[i] <= 0){
				sbyte[i] += 26;
			}
			sbyte[i] += 64;
		}
		System.out.println(new String(sbyte));

	}
}

0