結果

問題 No.1448 和差算
ユーザー 萩3萩3
提出日時 2021-05-02 17:25:17
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 395 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 80,464 KB
最終ジャッジ日時 2023-09-28 08:01:29
合計ジャッジ時間 9,204 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 159 ms
78,940 KB
testcase_04 AC 158 ms
78,904 KB
testcase_05 AC 157 ms
78,856 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 155 ms
78,868 KB
testcase_12 AC 153 ms
78,920 KB
testcase_13 AC 156 ms
78,832 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 158 ms
78,896 KB
testcase_17 RE -
testcase_18 AC 158 ms
79,032 KB
testcase_19 AC 158 ms
79,124 KB
testcase_20 AC 156 ms
78,908 KB
testcase_21 AC 161 ms
78,896 KB
testcase_22 RE -
testcase_23 AC 158 ms
78,876 KB
testcase_24 AC 158 ms
78,836 KB
testcase_25 AC 157 ms
78,928 KB
testcase_26 AC 159 ms
78,912 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 157 ms
78,940 KB
testcase_32 AC 155 ms
78,940 KB
testcase_33 RE -
testcase_34 AC 152 ms
78,888 KB
testcase_35 AC 153 ms
78,972 KB
testcase_36 AC 154 ms
78,704 KB
testcase_37 AC 155 ms
78,824 KB
testcase_38 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:15: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
  tmp = (-4(a+c))%m

ソースコード

diff #

m = 1_000_000_007
a,b,c,d = map(int,input().split())
n= int(input())
div,rem = divmod(n,8)

if rem == 0:
    tmp = (b+d)%m
elif rem == 1:
    tmp = (2*b)%m
elif rem == 2:
    tmp = (2*(b-c))%m
elif rem == 3:
    tmp = (-4*c)%m
elif rem == 4:
    tmp = (-4(a+c))%m
elif tmp == 5:
    tmp = (-8*a)%m
elif tmp == 6:
    tmp = (-8*(a-c))%m
else:
    tmp = (16*d)%m
    
print((tmp*pow(16,div,m))%m)
0