結果

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

ソースコード

diff #

import java.util.Scanner;

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

        int n = scanner.nextInt();
        scanner.nextLine();

        String s = scanner.nextLine();

        int[]  p = new int[n];

        for (int i = 0; i < n; i++) {
            p[i] = scanner.nextInt();
        }

        for (int i = 0; i < n; i++) {
            System.out.print(s.charAt(p[i]-1));
        }

        scanner.close();
    }
}
0