結果

問題 No.2827 Enter User Name to Play
ユーザー vjudge1
提出日時 2025-04-17 18:06:13
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 1,815 ms
コンパイル使用メモリ 75,604 KB
実行使用メモリ 50,912 KB
最終ジャッジ日時 2025-04-17 18:06:18
合計ジャッジ時間 3,876 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
// 24K-3032
public class Main {
    public static void main(String[] args) {
        String s = "chatgpt";
        int n=s.length();
        int[] arr = {3,4,7,5,2,6,1};

        char c;
        char[] formatted = new char[n];
        for(int i=0; i<n; i++){
            c = s.charAt(arr[i]-1);
            formatted[i] = c;
        }
        System.out.println(formatted);
    }
}
0