結果
| 問題 | No.222 引き算と足し算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-10 20:04:14 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 1,000 ms |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 77,716 KB |
| 最終ジャッジ日時 | 2025-12-03 15:35:23 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
# -*- coding:utf-8 -*- if __name__ == "__main__": S = raw_input() for i,s in enumerate(S[1:]): if s.isdigit(): continue else: ope = s ope_num = i + 1 break num1 = int(S[:ope_num]) num2 = int(S[ope_num+1:]) if ope == "-": print num1 + num2 else: print num1 - num2