結果

問題 No.1448 和差算
ユーザー Super SolenoidSuper Solenoid
提出日時 2021-05-02 19:13:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-28 09:36:51
合計ジャッジ時間 2,495 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,760 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 15 ms
7,804 KB
testcase_05 AC 15 ms
7,816 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 16 ms
7,844 KB
testcase_09 AC 16 ms
7,808 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 17 ms
7,840 KB
testcase_14 WA -
testcase_15 AC 16 ms
7,880 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,844 KB
testcase_21 AC 16 ms
7,916 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 15 ms
7,848 KB
testcase_26 AC 15 ms
7,840 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 16 ms
7,820 KB
testcase_32 AC 15 ms
7,844 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 15 ms
7,920 KB
testcase_37 AC 16 ms
7,884 KB
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C, D = map(int, input().split())
N = int(input())
    
k = (N+1)%4
m = int((N+1-k)/4)

s = 1

if m%2==1:
    B, A, D, C = A, B, C, D
    s = -1
    
p = pow(10,9)+7

L = [D, B+D, 2*B, 2*(B-C)]

print((s*pow(4,m,p)*L[k])%p)
0