結果
問題 | No.222 引き算と足し算 |
ユーザー |
![]() |
提出日時 | 2017-06-26 04:28:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-04 07:42:25 |
合計ジャッジ時間 | 2,038 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
ソースコード
xoy=list(input()) x="" i=0 if xoy[i]=="-" or xoy[i]=="+": if xoy[i]=="-": 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]=="-" or xoy[i]=="+": 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)