結果
| 問題 | No.1158 GCD Products easy |
| ユーザー |
|
| 提出日時 | 2020-08-11 15:27:24 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 209 ms / 2,000 ms |
| + 832µs | |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-12 13:54:52 |
| 合計ジャッジ時間 | 2,417 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
from math import gcd
import sys
def input():
return sys.stdin.readline()
a, b, n = [int(i) for i in input().split()]
mod = 10**9+7
ans = 1
def c(gc, n):
global ans
if n == 0:
ans *= gc
ans %= mod
return
for i in range(a, b + 1):
c(gcd(gc, i), n-1)
c(0, n)
print(ans)