結果

問題 No.2034 Anti Lexicography
ユーザー tentententen
提出日時 2022-08-15 09:07:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 1,071 bytes
コンパイル時間 2,255 ms
コンパイル使用メモリ 75,412 KB
実行使用メモリ 54,692 KB
最終ジャッジ日時 2024-04-09 21:53:51
合計ジャッジ時間 4,748 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
50,420 KB
testcase_01 AC 49 ms
50,340 KB
testcase_02 AC 49 ms
50,164 KB
testcase_03 AC 49 ms
50,148 KB
testcase_04 AC 47 ms
50,264 KB
testcase_05 AC 120 ms
54,128 KB
testcase_06 AC 127 ms
54,304 KB
testcase_07 AC 128 ms
54,236 KB
testcase_08 AC 130 ms
54,016 KB
testcase_09 AC 125 ms
54,116 KB
testcase_10 AC 129 ms
54,112 KB
testcase_11 AC 130 ms
54,236 KB
testcase_12 AC 128 ms
54,692 KB
testcase_13 AC 49 ms
50,392 KB
testcase_14 AC 50 ms
50,464 KB
testcase_15 AC 51 ms
50,300 KB
testcase_16 AC 53 ms
50,376 KB
testcase_17 AC 53 ms
50,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        for (char c : sc.next().toCharArray()) {
            sb.append((char)('z' - (c - 'a')));
        }
        System.out.println(sb);
    }
}

class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}
0