結果

問題 No.885 アマリクエリ
ユーザー jensenjensen
提出日時 2021-01-22 10:30:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 24,360 KB
最終ジャッジ日時 2023-08-27 00:48:19
合計ジャッジ時間 6,463 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 140 ms
24,360 KB
testcase_04 AC 140 ms
23,184 KB
testcase_05 AC 120 ms
19,920 KB
testcase_06 AC 144 ms
11,140 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
7,908 KB
testcase_11 AC 15 ms
7,760 KB
testcase_12 AC 14 ms
7,852 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 16 ms
8,212 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 16 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

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