結果

問題 No.1359 [Zelkova 3rd Tune] 四人セゾン
コンテスト
ユーザー NatsubiSogan
提出日時 2021-01-22 21:51:35
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 300 ms / 2,000 ms
+ 595µs
コード長 333 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 61 ms
コンパイル使用メモリ 82,540 KB
実行使用メモリ 159,544 KB
最終ジャッジ日時 2026-10-08 19:38:14
合計ジャッジ時間 31,318 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 75
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n, k, m = map(int, input().split())
p = sorted(list(map(int, input().split())))
e = sorted(list(map(int, input().split())))
a = sorted(list(map(int, input().split())))
h = sorted(list(map(int, input().split())))
ans = 0
for i in range(n):
    l = [p[i], e[i], a[i], h[i]]
    ans += pow(max(l) - min(l), k, m)
    ans %= m
print(ans)
0