結果

問題 No.2184 A○B問題
ユーザー lam6er
提出日時 2025-03-20 18:45:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 53,972 KB
最終ジャッジ日時 2025-03-20 18:45:35
合計ジャッジ時間 1,722 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

# Read input permutations A and B
A = list(map(int, input().split()))
B = list(map(int, input().split()))

# Compute the composition A ○ B
result = []
for i in range(5):
    # B[i] is the value at position i+1 in permutation B
    # A[B[i] - 1] gives the value after applying A to B[i]
    result.append(str(A[B[i] - 1]))

# Output the result
print(' '.join(result))
0