結果
問題 |
No.1083 余りの余り
|
ユーザー |
![]() |
提出日時 | 2023-11-04 14:05:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 307,000 KB |
最終ジャッジ日時 | 2024-09-25 22:01:43 |
合計ジャッジ時間 | 11,654 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 5 |
ソースコード
# coding: utf-8 # Your code here! import itertools N,K=map(int,input().split()) A=list(map(int,input().split())) patterns = list(itertools.product([0, 1], repeat=N)) ans=0 for pattern in patterns: """ 1のやつは先に """ x=K for a,bit in zip(A,pattern): if bit: x%=a for a in A: x%=a ans=max(ans,x) print(ans)