結果

問題 No.885 アマリクエリ
ユーザー jensenjensen
提出日時 2021-01-22 10:30:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 25,932 KB
最終ジャッジ日時 2024-12-26 05:06:23
合計ジャッジ時間 5,940 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
q=int(input())
x=list(map(int,input().split()))

x_max=100001
cnt=0
for i in range(q):
    if(x[i]<x_max):
        cnt=0
        for j in range(n):
            a[j]%=x[i]
            cnt+=a[j]
            x_max=x[i]
        print(cnt)
    else:
        print(cnt)
0