結果

問題 No.1259 スイッチ
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-17 14:47:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 180 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 8,268 KB
最終ジャッジ日時 2023-09-28 08:00:30
合計ジャッジ時間 16,425 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,928 KB
testcase_01 AC 14 ms
7,936 KB
testcase_02 AC 13 ms
7,928 KB
testcase_03 AC 13 ms
8,060 KB
testcase_04 AC 13 ms
8,096 KB
testcase_05 AC 13 ms
7,860 KB
testcase_06 AC 13 ms
7,864 KB
testcase_07 AC 14 ms
7,932 KB
testcase_08 AC 14 ms
8,196 KB
testcase_09 AC 13 ms
7,880 KB
testcase_10 AC 242 ms
7,892 KB
testcase_11 AC 335 ms
7,812 KB
testcase_12 AC 232 ms
7,892 KB
testcase_13 AC 148 ms
7,860 KB
testcase_14 AC 194 ms
7,776 KB
testcase_15 AC 145 ms
7,812 KB
testcase_16 AC 320 ms
7,720 KB
testcase_17 AC 193 ms
7,812 KB
testcase_18 AC 355 ms
7,836 KB
testcase_19 AC 328 ms
7,980 KB
testcase_20 AC 240 ms
7,928 KB
testcase_21 AC 400 ms
7,724 KB
testcase_22 AC 117 ms
7,828 KB
testcase_23 AC 335 ms
7,772 KB
testcase_24 AC 251 ms
7,920 KB
testcase_25 AC 262 ms
7,928 KB
testcase_26 AC 352 ms
7,840 KB
testcase_27 AC 321 ms
7,888 KB
testcase_28 AC 258 ms
7,928 KB
testcase_29 AC 335 ms
7,788 KB
testcase_30 AC 196 ms
8,192 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 233 ms
8,180 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 197 ms
8,192 KB
testcase_49 WA -
testcase_50 AC 230 ms
7,872 KB
testcase_51 AC 130 ms
7,836 KB
testcase_52 AC 369 ms
7,800 KB
testcase_53 AC 167 ms
7,724 KB
testcase_54 AC 369 ms
7,928 KB
testcase_55 AC 121 ms
7,868 KB
testcase_56 AC 189 ms
7,804 KB
testcase_57 AC 328 ms
7,796 KB
testcase_58 AC 257 ms
7,808 KB
testcase_59 AC 311 ms
7,872 KB
testcase_60 AC 405 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M,P,p=10**9+7,print,pow
n,k,m=map(int,input().split())
a,y=0,1
for i in range(1,n+1):
 if k%i==0:a+=y*p(n,n-i,M)
 y*=n-i;y%=M
if m==1:exit(P(a))
a=p(n,n,M)-a
a*=p(n-1,M-2,M)
P(a%M)
0