結果
| 問題 |
No.222 引き算と足し算
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-06-26 04:24:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-04 07:41:26 |
| 合計ジャッジ時間 | 2,143 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 RE * 10 |
ソースコード
xoy=list(input())
x=""
i=0
if xoy[0]=="-":
x+=("-")
i+=1
#print(i)
while i<len(xoy) and xoy[i]!="+" and xoy[i]!="-":
x+=xoy[i]
i+=1
op=xoy[i]
y=""
i+=1
if xoy[i]=="-":
y+="-"
i+=1
#print(xoy)
while i<len(xoy):
y+=xoy[i]
i+=1
#rint (y)
x=int(x)
#rint (x)
y=int(y)
#rint(x+y)
if op=="-":
print(x+y)
else:
print (x-y)
rocoder