結果

問題 No.2827 Enter User Name to Play
ユーザー vjudge1
提出日時 2025-04-17 18:39:54
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 679 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 76,436 KB
実行使用メモリ 56,496 KB
最終ジャッジ日時 2025-04-17 18:40:04
合計ジャッジ時間 6,320 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;

        n = sc.nextInt();
        char[] string = new char[n];
        if(n<2 && n>16){
            return;
        }
        for (int i=0;i<n;i++){
            string[i] = sc.next().charAt(0);
        }
        int[] p  = new int[n];
        for (int i=0;i<n;i++){
            p[i] = sc.nextInt();
        }
        char[] newstring = new char[n];
        for(int i=0;i<n;i++){
            newstring[i] = string[p[i]-1];
        }

        for (int i=0;i<n;i++){
            System.out.println(newstring[i]);
        }
    }
}
0