結果

問題 No.1158 GCD Products easy
ユーザー pluto77pluto77
提出日時 2022-02-16 14:56:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 204 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 76,996 KB
最終ジャッジ日時 2023-09-11 17:12:00
合計ジャッジ時間 4,288 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,468 KB
testcase_01 AC 73 ms
71,276 KB
testcase_02 AC 76 ms
71,348 KB
testcase_03 AC 75 ms
71,492 KB
testcase_04 AC 73 ms
71,244 KB
testcase_05 AC 78 ms
76,284 KB
testcase_06 AC 71 ms
71,372 KB
testcase_07 AC 83 ms
76,452 KB
testcase_08 AC 72 ms
71,568 KB
testcase_09 AC 72 ms
71,580 KB
testcase_10 AC 73 ms
71,172 KB
testcase_11 AC 72 ms
71,572 KB
testcase_12 AC 80 ms
76,172 KB
testcase_13 AC 75 ms
71,080 KB
testcase_14 AC 77 ms
71,560 KB
testcase_15 AC 74 ms
71,268 KB
testcase_16 AC 73 ms
71,204 KB
testcase_17 AC 72 ms
71,592 KB
testcase_18 AC 73 ms
71,220 KB
testcase_19 AC 74 ms
71,248 KB
testcase_20 AC 74 ms
71,560 KB
testcase_21 AC 73 ms
71,548 KB
testcase_22 AC 73 ms
71,012 KB
testcase_23 AC 73 ms
71,480 KB
testcase_24 AC 80 ms
76,272 KB
testcase_25 AC 73 ms
71,300 KB
testcase_26 AC 204 ms
76,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1158
import itertools,math
mod=10**9+7
a,b,n=map(int,input().split())
res=1
for t in itertools.product(range(a,b+1),repeat=n):
 g=0
 for i in t:
  g=math.gcd(g,i)
 res*=g
 res%=mod
print(res)
0