結果

問題 No.222 引き算と足し算
ユーザー syunsukesyunsuke
提出日時 2020-09-18 22:12:04
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 315 bytes
コンパイル時間 1,738 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 79,044 KB
最終ジャッジ日時 2023-09-04 10:58:02
合計ジャッジ時間 5,671 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,280 KB
testcase_01 AC 75 ms
71,032 KB
testcase_02 AC 76 ms
71,168 KB
testcase_03 AC 76 ms
70,904 KB
testcase_04 AC 76 ms
71,028 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 77 ms
71,244 KB
testcase_10 AC 78 ms
71,240 KB
testcase_11 RE -
testcase_12 AC 76 ms
71,248 KB
testcase_13 AC 76 ms
71,264 KB
testcase_14 RE -
testcase_15 AC 76 ms
71,312 KB
testcase_16 AC 77 ms
71,372 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 76 ms
71,360 KB
testcase_20 AC 76 ms
71,212 KB
testcase_21 AC 76 ms
71,236 KB
testcase_22 AC 77 ms
71,320 KB
testcase_23 AC 76 ms
71,300 KB
testcase_24 AC 74 ms
71,252 KB
testcase_25 RE -
testcase_26 AC 77 ms
71,452 KB
testcase_27 AC 76 ms
71,240 KB
testcase_28 RE -
testcase_29 RE -
testcase_30 AC 77 ms
71,264 KB
testcase_31 AC 77 ms
71,244 KB
testcase_32 AC 78 ms
71,096 KB
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()

if "++" in S:
    a,b=S.split("++")
    print(int(a)-int(b))
elif "+" in S:
    a,b=S.split("+")
    print(int(a)-int(b))

elif "--" in S:
    a,b=S.split("--")
    print(int(a)-int(b))
elif S[0]=="-":
    a,b=S[1:].split("-")
    print(int(-a)+int(b))
else:
    a,b=S.split("-")
    print(int(a)+int(b))
0