結果
| 問題 | No.885 アマリクエリ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-22 10:33:10 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 312 bytes |
| 記録 | |
| コンパイル時間 | 509 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 29,052 KB |
| 最終ジャッジ日時 | 2026-06-01 00:57:51 |
| 合計ジャッジ時間 | 7,003 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 2 TLE * 1 -- * 16 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
q=int(input())
x=list(map(int,input().split()))
x_max=10**9+1
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)