結果

問題 No.222 引き算と足し算
ユーザー maimai
提出日時 2017-02-26 19:22:09
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 95 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 15,364 KB
最終ジャッジ日時 2023-09-02 10:06:35
合計ジャッジ時間 4,394 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,172 KB
testcase_01 AC 79 ms
15,080 KB
testcase_02 AC 79 ms
15,160 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 79 ms
15,172 KB
testcase_09 AC 79 ms
15,084 KB
testcase_10 AC 80 ms
15,280 KB
testcase_11 AC 79 ms
15,136 KB
testcase_12 AC 77 ms
15,080 KB
testcase_13 AC 79 ms
15,264 KB
testcase_14 AC 77 ms
15,164 KB
testcase_15 AC 80 ms
15,172 KB
testcase_16 AC 80 ms
15,260 KB
testcase_17 AC 79 ms
15,140 KB
testcase_18 AC 79 ms
15,280 KB
testcase_19 AC 81 ms
15,100 KB
testcase_20 RE -
testcase_21 AC 80 ms
15,172 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 80 ms
15,260 KB
testcase_25 AC 80 ms
15,080 KB
testcase_26 RE -
testcase_27 AC 79 ms
15,168 KB
testcase_28 AC 79 ms
15,040 KB
testcase_29 RE -
testcase_30 AC 79 ms
15,288 KB
testcase_31 RE -
testcase_32 AC 81 ms
15,280 KB
testcase_33 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s=gets.chomp
a=s.scan(/(-?\d+)(\+|-)(-?\d+)/)

a=a[0]

a[1]=a[1]=="-" ? "+" : "-"

p eval(a*"")
0