結果
| 問題 | No.49 算数の宿題 |
| コンテスト | |
| ユーザー |
anta
|
| 提出日時 | 2014-10-23 23:10:35 |
| 言語 | JavaScript (node v26.11.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 48 ms / 5,000 ms |
| + 632µs | |
| コード長 | 404 bytes |
| 記録 | |
| コンパイル時間 | 3 ms |
| コンパイル使用メモリ | 9,824 KB |
| 実行使用メモリ | 51,028 KB |
| 最終ジャッジ日時 | 2026-10-15 14:03:36 |
| 合計ジャッジ時間 | 2,034 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
function Main(input) {
// the first line is assigned to input[0], the second line is assigned to input[1] similarly.
var s = input.replace(/([\*\+])/g, ')$1');
s = s.replace(/[^\)]/g, '').replace(/\)/g, '(') + s;
s = s.replace(/\+/g, 'a').replace(/\*/g, '+').replace(/a/g, '*');
console.log('%d', eval(s));
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
anta