結果
| 問題 | No.222 引き算と足し算 |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2025-06-01 18:45:31 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 1,000 ms |
| + 639µs | |
| コード長 | 513 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-11 05:24:41 |
| 合計ジャッジ時間 | 5,295 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
for i in range(1, len(s)):
if s[i] == '+':
ans = int(s[:i]) - int(s[i+1:])
break
if s[i] == '-':
ans = int(s[:i]) + int(s[i+1:])
break
print(ans)
r_ishida