結果
| 問題 | No.222 引き算と足し算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-23 10:28:37 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 33 ms / 1,000 ms |
| + 616µs | |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 83 ms |
| コンパイル使用メモリ | 64,288 KB |
| 実行使用メモリ | 53,664 KB |
| 最終ジャッジ日時 | 2026-11-13 11:56:28 |
| 合計ジャッジ時間 | 3,179 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
S = input().rstrip()
x, y, op = "", "", ""
for i in range(len(S)):
if i != 0 and (S[i] == "+" or S[i] == "-"):
x = S[0:i]
y = S[i + 1:]
op = S[i]
break
x, y = int(x), int(y)
if op == "+":
print(x - y)
else:
print(x + y)