結果

問題 No.722 100×100=1000
コンテスト
ユーザー merom686
提出日時 2018-08-03 22:39:22
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 598 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 540 ms
コンパイル使用メモリ 95,104 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-03 13:27:03
合計ジャッジ時間 1,857 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

bool f(int a) {
    int b = abs(a);
    while (b != 0 && b % 10 == 0) b /= 10;
    return a % 100 == 0 && 1 <= b && b <= 9;
}

int main() {
    ll a, b;
    cin >> a >> b;

    ll c = a * b;

    if (f(a) && f(b)) {
        cout << c / 10 << endl;
    } else {
        if (abs(c) <= 99999999) {
            cout << c << endl;
        } else {
            cout << 'E' << endl;
        }
    }

    return 0;
}
0