結果

問題 No.1258 コインゲーム
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-17 14:31:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,608 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,520 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-28 07:57:54
合計ジャッジ時間 44,145 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 278 ms
7,816 KB
testcase_01 AC 353 ms
7,792 KB
testcase_02 AC 135 ms
7,872 KB
testcase_03 AC 1,144 ms
7,780 KB
testcase_04 AC 1,272 ms
7,836 KB
testcase_05 AC 212 ms
7,860 KB
testcase_06 AC 913 ms
7,876 KB
testcase_07 AC 105 ms
7,876 KB
testcase_08 AC 88 ms
7,940 KB
testcase_09 AC 464 ms
7,800 KB
testcase_10 AC 1,112 ms
7,892 KB
testcase_11 AC 1,233 ms
7,836 KB
testcase_12 AC 896 ms
7,800 KB
testcase_13 AC 285 ms
7,812 KB
testcase_14 AC 97 ms
7,788 KB
testcase_15 AC 1,083 ms
7,920 KB
testcase_16 AC 222 ms
7,788 KB
testcase_17 AC 1,222 ms
7,904 KB
testcase_18 AC 454 ms
7,800 KB
testcase_19 AC 420 ms
7,772 KB
testcase_20 AC 925 ms
7,928 KB
testcase_21 AC 1,182 ms
7,860 KB
testcase_22 AC 799 ms
7,800 KB
testcase_23 AC 606 ms
7,860 KB
testcase_24 AC 230 ms
7,924 KB
testcase_25 AC 573 ms
7,924 KB
testcase_26 AC 478 ms
7,924 KB
testcase_27 AC 1,119 ms
7,812 KB
testcase_28 AC 294 ms
7,964 KB
testcase_29 AC 313 ms
7,932 KB
testcase_30 AC 1,382 ms
7,768 KB
testcase_31 AC 354 ms
7,832 KB
testcase_32 AC 158 ms
7,872 KB
testcase_33 AC 963 ms
7,780 KB
testcase_34 AC 1,135 ms
7,892 KB
testcase_35 AC 408 ms
7,792 KB
testcase_36 AC 1,130 ms
7,884 KB
testcase_37 AC 449 ms
7,808 KB
testcase_38 AC 1,054 ms
7,928 KB
testcase_39 AC 307 ms
7,840 KB
testcase_40 AC 1,417 ms
7,940 KB
testcase_41 AC 1,425 ms
7,804 KB
testcase_42 AC 1,608 ms
7,856 KB
testcase_43 AC 1,424 ms
7,928 KB
testcase_44 AC 1,450 ms
7,872 KB
testcase_45 AC 1,433 ms
7,936 KB
testcase_46 AC 1,418 ms
7,724 KB
testcase_47 AC 1,429 ms
7,796 KB
testcase_48 AC 1,409 ms
7,888 KB
testcase_49 AC 1,441 ms
7,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M=10**9+7
for _ in range(int(input())):n,m,x=map(int,input().split());print(((1-(x+n)%2*2)*pow(m-1,n,M)+pow(m+1,n,M))*pow(2,M-2,M)%M)
0