結果

問題 No.222 引き算と足し算
ユーザー matrie
提出日時 2021-02-14 09:27:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 171 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-21 15:04:52
合計ジャッジ時間 2,652 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

L=['','','']
i=0
f=0
o="+-"
for c in input():
	if c in o and f==1:i=1;f=2
	L[i]+=c
	if f==2:i=2
	if c not in o:f=1
a,b=int(L[0]),int(L[2])
print(a+b if L[1]=='-' else a-b)
0