結果
問題 |
No.1201 お菓子配り-4
|
ユーザー |
![]() |
提出日時 | 2020-08-22 08:47:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 819 ms / 4,000 ms |
コード長 | 227 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 63,884 KB |
最終ジャッジ日時 | 2024-11-07 13:20:51 |
合計ジャッジ時間 | 10,820 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
import math MOD=1000000007 n=int(input()) m=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) ans=0 for i in a: for j in b: ans=(ans+(i+1)*(j+1)+(math.gcd(i,j)+1)-2*(j+1))%MOD print(ans)