結果

問題 No.1201 お菓子配り-4
ユーザー hotman78hotman78
提出日時 2020-08-22 08:46:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 227 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-25 03:37:52
合計ジャッジ時間 43,381 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
10,880 KB
testcase_01 AC 1,735 ms
11,136 KB
testcase_02 AC 2,450 ms
11,008 KB
testcase_03 AC 1,203 ms
10,880 KB
testcase_04 AC 597 ms
11,008 KB
testcase_05 AC 1,470 ms
10,880 KB
testcase_06 AC 238 ms
10,752 KB
testcase_07 AC 646 ms
10,880 KB
testcase_08 AC 1,854 ms
10,880 KB
testcase_09 AC 1,304 ms
10,880 KB
testcase_10 AC 39 ms
10,880 KB
testcase_11 AC 369 ms
10,752 KB
testcase_12 AC 2,721 ms
11,008 KB
testcase_13 AC 100 ms
10,880 KB
testcase_14 AC 66 ms
10,752 KB
testcase_15 AC 2,181 ms
11,008 KB
testcase_16 AC 699 ms
10,880 KB
testcase_17 AC 879 ms
10,880 KB
testcase_18 AC 169 ms
10,880 KB
testcase_19 AC 159 ms
10,880 KB
testcase_20 AC 30 ms
10,752 KB
testcase_21 AC 28 ms
10,752 KB
testcase_22 AC 30 ms
10,752 KB
testcase_23 AC 29 ms
10,752 KB
testcase_24 AC 29 ms
10,752 KB
testcase_25 AC 29 ms
10,752 KB
testcase_26 AC 32 ms
10,752 KB
testcase_27 AC 31 ms
10,752 KB
testcase_28 AC 31 ms
10,752 KB
testcase_29 AC 30 ms
10,752 KB
testcase_30 AC 3,602 ms
11,008 KB
testcase_31 AC 3,608 ms
11,136 KB
testcase_32 AC 3,653 ms
11,136 KB
testcase_33 AC 3,484 ms
11,008 KB
testcase_34 AC 3,525 ms
11,008 KB
testcase_35 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0