結果
問題 | No.1158 GCD Products easy |
ユーザー | vwxyz |
提出日時 | 2021-08-09 21:53:34 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 276 ms / 2,000 ms |
コード長 | 856 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 81,692 KB |
実行使用メモリ | 89,564 KB |
最終ジャッジ日時 | 2023-10-21 19:38:56 |
合計ジャッジ時間 | 6,515 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 152 ms
88,920 KB |
testcase_01 | AC | 151 ms
88,920 KB |
testcase_02 | AC | 152 ms
88,920 KB |
testcase_03 | AC | 152 ms
88,920 KB |
testcase_04 | AC | 154 ms
88,916 KB |
testcase_05 | AC | 157 ms
89,508 KB |
testcase_06 | AC | 152 ms
88,912 KB |
testcase_07 | AC | 163 ms
89,512 KB |
testcase_08 | AC | 155 ms
88,920 KB |
testcase_09 | AC | 152 ms
88,916 KB |
testcase_10 | AC | 153 ms
88,916 KB |
testcase_11 | AC | 156 ms
88,916 KB |
testcase_12 | AC | 161 ms
89,512 KB |
testcase_13 | AC | 155 ms
88,920 KB |
testcase_14 | AC | 153 ms
88,912 KB |
testcase_15 | AC | 153 ms
88,920 KB |
testcase_16 | AC | 156 ms
88,920 KB |
testcase_17 | AC | 156 ms
88,916 KB |
testcase_18 | AC | 156 ms
88,920 KB |
testcase_19 | AC | 157 ms
88,920 KB |
testcase_20 | AC | 153 ms
88,916 KB |
testcase_21 | AC | 155 ms
88,916 KB |
testcase_22 | AC | 156 ms
88,916 KB |
testcase_23 | AC | 156 ms
88,912 KB |
testcase_24 | AC | 157 ms
89,504 KB |
testcase_25 | AC | 155 ms
88,920 KB |
testcase_26 | AC | 276 ms
89,564 KB |
ソースコード
import bisect import copy import decimal import fractions import functools import heapq import itertools import math import random import sys from collections import Counter,deque,defaultdict from functools import lru_cache,reduce from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max def _heappush_max(heap,item): heap.append(item) heapq._siftdown_max(heap, 0, len(heap)-1) def _heappushpop_max(heap, item): if heap and item < heap[0]: item, heap[0] = heap[0], item heapq._siftup_max(heap, 0) return item from math import gcd as GCD read=sys.stdin.read readline=sys.stdin.readline readlines=sys.stdin.readlines ans=1 mod=10**9+7 A,B,N=map(int,readline().split()) for tpl in itertools.product(range(A,B+1),repeat=N): g=0 for x in tpl: g=GCD(g,x) ans*=g ans%=mod print(ans)