結果

問題 No.1083 余りの余り
ユーザー keymoon
提出日時 2024-12-16 21:54:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 414 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 1,473,864 KB
最終ジャッジ日時 2024-12-16 21:55:08
合計ジャッジ時間 24,563 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 17 TLE * 1 MLE * 11 OLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

inp1 = input().split()
inp2 = input().split()

seq= []
for s in inp2:
    seq.append(int(s))

allseq = list(itertools.permutations(seq))
print(allseq)
anc = []
ini = int(inp1[1])    
for s in allseq:
    a = ini 
    for q in s:
        a = a % q
    anc.append(a)
print(max(anc))
0