結果

問題 No.1201 お菓子配り-4
ユーザー tktk_snsntktk_snsn
提出日時 2022-05-01 05:44:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 270 bytes
コンパイル時間 1,026 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 8,536 KB
最終ジャッジ日時 2023-09-12 20:56:19
合計ジャッジ時間 42,249 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
8,000 KB
testcase_01 AC 1,553 ms
8,356 KB
testcase_02 AC 2,278 ms
8,392 KB
testcase_03 AC 1,162 ms
7,900 KB
testcase_04 AC 566 ms
8,020 KB
testcase_05 AC 1,357 ms
7,944 KB
testcase_06 AC 217 ms
7,944 KB
testcase_07 AC 605 ms
7,912 KB
testcase_08 AC 1,705 ms
8,464 KB
testcase_09 AC 1,233 ms
8,416 KB
testcase_10 AC 25 ms
7,896 KB
testcase_11 AC 334 ms
7,832 KB
testcase_12 AC 2,622 ms
8,444 KB
testcase_13 AC 85 ms
7,880 KB
testcase_14 AC 50 ms
7,884 KB
testcase_15 AC 2,082 ms
8,420 KB
testcase_16 AC 637 ms
7,984 KB
testcase_17 AC 859 ms
7,892 KB
testcase_18 AC 140 ms
7,836 KB
testcase_19 AC 140 ms
8,000 KB
testcase_20 AC 16 ms
8,004 KB
testcase_21 AC 16 ms
8,008 KB
testcase_22 AC 15 ms
7,812 KB
testcase_23 AC 16 ms
8,016 KB
testcase_24 AC 16 ms
7,980 KB
testcase_25 AC 16 ms
7,832 KB
testcase_26 AC 16 ms
7,908 KB
testcase_27 AC 16 ms
8,016 KB
testcase_28 AC 15 ms
7,880 KB
testcase_29 AC 16 ms
7,808 KB
testcase_30 AC 3,466 ms
8,404 KB
testcase_31 AC 3,317 ms
8,340 KB
testcase_32 AC 3,348 ms
8,408 KB
testcase_33 AC 3,347 ms
8,476 KB
testcase_34 AC 3,294 ms
8,504 KB
testcase_35 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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