結果

問題 No.1258 コインゲーム
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-17 14:31:01
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 547 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 79,164 KB
最終ジャッジ日時 2023-09-28 07:56:54
合計ジャッジ時間 21,721 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 189 ms
78,332 KB
testcase_01 AC 214 ms
78,424 KB
testcase_02 AC 146 ms
78,260 KB
testcase_03 AC 453 ms
78,688 KB
testcase_04 AC 496 ms
78,668 KB
testcase_05 AC 172 ms
78,204 KB
testcase_06 AC 391 ms
78,440 KB
testcase_07 AC 140 ms
78,464 KB
testcase_08 AC 134 ms
78,160 KB
testcase_09 AC 252 ms
78,628 KB
testcase_10 AC 440 ms
78,796 KB
testcase_11 AC 484 ms
78,632 KB
testcase_12 AC 380 ms
78,824 KB
testcase_13 AC 191 ms
78,300 KB
testcase_14 AC 137 ms
78,236 KB
testcase_15 AC 441 ms
78,712 KB
testcase_16 AC 171 ms
78,464 KB
testcase_17 AC 486 ms
78,828 KB
testcase_18 AC 243 ms
78,708 KB
testcase_19 AC 239 ms
78,444 KB
testcase_20 AC 390 ms
78,492 KB
testcase_21 AC 470 ms
78,580 KB
testcase_22 AC 353 ms
78,788 KB
testcase_23 AC 289 ms
78,616 KB
testcase_24 AC 173 ms
78,080 KB
testcase_25 AC 277 ms
78,576 KB
testcase_26 AC 253 ms
78,608 KB
testcase_27 AC 447 ms
78,588 KB
testcase_28 AC 200 ms
78,396 KB
testcase_29 AC 209 ms
78,424 KB
testcase_30 AC 532 ms
78,688 KB
testcase_31 AC 216 ms
78,400 KB
testcase_32 AC 155 ms
78,392 KB
testcase_33 AC 393 ms
78,788 KB
testcase_34 AC 463 ms
78,712 KB
testcase_35 AC 231 ms
78,544 KB
testcase_36 AC 453 ms
78,720 KB
testcase_37 AC 243 ms
79,016 KB
testcase_38 AC 428 ms
78,820 KB
testcase_39 AC 197 ms
78,380 KB
testcase_40 AC 547 ms
78,892 KB
testcase_41 AC 529 ms
78,952 KB
testcase_42 AC 533 ms
78,924 KB
testcase_43 AC 533 ms
79,096 KB
testcase_44 AC 534 ms
78,972 KB
testcase_45 AC 529 ms
78,944 KB
testcase_46 AC 528 ms
78,976 KB
testcase_47 AC 526 ms
78,792 KB
testcase_48 AC 533 ms
79,100 KB
testcase_49 AC 529 ms
79,164 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