結果
問題 |
No.1201 お菓子配り-4
|
ユーザー |
![]() |
提出日時 | 2022-05-01 05:44:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 270 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-06-30 08:30:08 |
合計ジャッジ時間 | 45,095 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 TLE * 1 |
ソースコード
from math import gcd mod = 10 ** 9 + 7 N = int(input()) M = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ans = 0 for b in B: for a in A: ans += a * (b + 1) ans -= b - gcd(a, b) ans %= mod print(ans)