結果

問題 No.18 うーさー暗号
ユーザー キョウチクキョウチク
提出日時 2022-05-30 18:22:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 173 ms / 5,000 ms
コード長 482 bytes
コンパイル時間 3,457 ms
コンパイル使用メモリ 75,796 KB
実行使用メモリ 58,560 KB
最終ジャッジ日時 2023-10-21 00:22:44
合計ジャッジ時間 6,614 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 157 ms
58,560 KB
testcase_01 AC 152 ms
56,512 KB
testcase_02 AC 150 ms
58,348 KB
testcase_03 AC 164 ms
58,444 KB
testcase_04 AC 159 ms
58,336 KB
testcase_05 AC 156 ms
58,240 KB
testcase_06 AC 171 ms
58,540 KB
testcase_07 AC 173 ms
58,468 KB
testcase_08 AC 163 ms
58,496 KB
testcase_09 AC 159 ms
57,936 KB
testcase_10 AC 156 ms
58,508 KB
testcase_11 AC 153 ms
58,320 KB
testcase_12 AC 168 ms
58,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test12 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String[] line;
    String regex=" ",plain="";
    line=sc.nextLine().split(regex);
    int n=line[0].length();
    int[] chip_=new int[n];
    int tmp=25;
    for(int i=0;i<n;i++){
      int tmp0=(int)line[0].charAt(i)-65;
      int tmp1=(tmp0+tmp)%26+65;
      plain+=(char)tmp1;
      tmp+=25;
    }
    System.out.println(plain);
    sc.close();
  }
}
0