結果
| 問題 |
No.222 引き算と足し算
|
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2015-08-04 22:15:01 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 1,000 ms |
| コード長 | 154 bytes |
| コンパイル時間 | 271 ms |
| コンパイル使用メモリ | 7,076 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-15 22:03:26 |
| 合計ジャッジ時間 | 1,461 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
s = raw_input() for i in range(len(s)): if s[i].isdigit() and not s[i+1].isdigit(): break print int(s[0:i+1])+int(s[i+2:])*(1 if s[i+1] == "-" else -1)
Tawara