結果

問題 No.1158 GCD Products easy
ユーザー hirayuu_ychirayuu_yc
提出日時 2023-08-01 21:23:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 76,496 KB
最終ジャッジ日時 2024-04-19 20:29:31
合計ジャッジ時間 2,289 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,140 KB
testcase_01 AC 34 ms
52,156 KB
testcase_02 AC 33 ms
52,708 KB
testcase_03 AC 33 ms
52,772 KB
testcase_04 AC 34 ms
52,676 KB
testcase_05 AC 34 ms
54,140 KB
testcase_06 AC 33 ms
52,664 KB
testcase_07 AC 57 ms
75,988 KB
testcase_08 AC 33 ms
52,508 KB
testcase_09 AC 34 ms
52,676 KB
testcase_10 AC 32 ms
52,536 KB
testcase_11 AC 32 ms
53,088 KB
testcase_12 AC 42 ms
64,100 KB
testcase_13 AC 33 ms
52,480 KB
testcase_14 AC 33 ms
52,904 KB
testcase_15 AC 32 ms
52,368 KB
testcase_16 AC 32 ms
53,328 KB
testcase_17 AC 32 ms
52,484 KB
testcase_18 AC 32 ms
52,728 KB
testcase_19 AC 31 ms
53,168 KB
testcase_20 AC 31 ms
53,076 KB
testcase_21 AC 32 ms
53,816 KB
testcase_22 AC 32 ms
52,596 KB
testcase_23 AC 33 ms
54,348 KB
testcase_24 AC 49 ms
70,756 KB
testcase_25 AC 33 ms
53,256 KB
testcase_26 AC 130 ms
76,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

def calc(now,nowg):
	global ans
	if len(now)==N:
		ans=ans*nowg%1000000007
	else:
		for i in range(A,B+1):
			calc(now+[i],gcd(nowg,i))

A,B,N=map(int,input().split())
ans=1
calc([],3628800)
print(ans)
0