結果
問題 |
No.722 100×100=1000
|
ユーザー |
|
提出日時 | 2021-03-31 21:37:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 792 bytes |
コンパイル時間 | 2,344 ms |
コンパイル使用メモリ | 112,176 KB |
最終ジャッジ日時 | 2025-01-20 03:01:36 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <algorithm> #include <array> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <numeric> #include <optional> #include <queue> #include <set> #include <sstream> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; int main() { int64_t a, b; cin >> a >> b; auto f = [](int64_t x) { x = abs(x); if (x < 100) return false; while (x % 10 == 0) { x /= 10; } return x < 10; }; if (f(a) && f(b)) { cout << a * b / 10 << endl; } else { if (-99999999 <= a * b && a * b <= 99999999) { cout << a * b << endl; } else { cout << "E" << endl; } } return 0; }