結果
問題 | No.1158 GCD Products easy |
ユーザー | syunsuke |
提出日時 | 2020-09-18 01:32:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,157 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 87,172 KB |
実行使用メモリ | 71,572 KB |
最終ジャッジ日時 | 2023-09-04 08:14:34 |
合計ジャッジ時間 | 3,490 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,340 KB |
testcase_01 | AC | 74 ms
71,532 KB |
testcase_02 | WA | - |
testcase_03 | AC | 76 ms
71,400 KB |
testcase_04 | AC | 73 ms
71,272 KB |
testcase_05 | WA | - |
testcase_06 | AC | 73 ms
71,496 KB |
testcase_07 | WA | - |
testcase_08 | AC | 74 ms
71,192 KB |
testcase_09 | AC | 73 ms
71,388 KB |
testcase_10 | AC | 73 ms
71,452 KB |
testcase_11 | AC | 73 ms
71,176 KB |
testcase_12 | WA | - |
testcase_13 | AC | 73 ms
71,500 KB |
testcase_14 | AC | 74 ms
71,456 KB |
testcase_15 | AC | 73 ms
71,384 KB |
testcase_16 | AC | 73 ms
71,404 KB |
testcase_17 | AC | 73 ms
71,516 KB |
testcase_18 | AC | 75 ms
71,348 KB |
testcase_19 | AC | 74 ms
71,348 KB |
testcase_20 | AC | 75 ms
71,336 KB |
testcase_21 | WA | - |
testcase_22 | AC | 76 ms
71,544 KB |
testcase_23 | AC | 76 ms
71,544 KB |
testcase_24 | WA | - |
testcase_25 | AC | 75 ms
71,572 KB |
testcase_26 | WA | - |
ソースコード
A,B,N=map(int,input().split()) L=[0 for i in range(11)] for i in range(B,A-1,-1): #print(i) if i*2>B: L[i]=1 elif i==5: if B>=i*2: L[i]+=(2**N)-L[i*2] else: L[i]+=1 elif i==4: if B>=i*2: L[i]+=(2**N)-L[i*2] else: L[i]+=1 elif i==3: if B>=3*i: L[i]+=(3**N)-L[i*3]-L[i*2] elif B>=2*i: L[i]+=(2**N)-L[i*2] else: L[i]+=1 elif i==2: if B>=5*i: L[i]+=(5**N)-L[i*5]-L[i*3]-(2**N) elif B>=4*i: L[i]+=(4**N)-L[i*3]-(2**N) elif B>=3*i: L[i]+=(3**N)-L[i*3]-L[i*2] elif B>=2*i: L[i]+=(2**N)-L[i*2] else: L[i]+=1 if B>=6 and 4>=A: L[2]+=(2**N)-2 if B>=8 and 6>=A: L[2]+=(2**N)-2 if B>=10 and 6>=A: L[2]+=(2**N)-2 if B>=10 and 8>=A: L[2]+=(2**N)-2 if B>=10 and 4>=A: L[2]+=(2**N)-2 if B>=9 and 6>=A: L[3]+=(2**N)-2 mod=10**9+7 ans=1 for i in range(1,11): ans=ans*pow(i,L[i],mod) ans%=mod print(ans) #print(L)