結果

問題 No.722 100×100=1000
ユーザー focus
提出日時 2018-08-04 08:05:52
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 68,912 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:24:59
合計ジャッジ時間 1,802 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
using ll = long long;
using namespace std;
int main(){
    ll a,b;
    ll ans;
    cin >> a >> b;
    ans = a*b;
    if(abs(a)>=100&&abs(b)>=100){
        while(abs(a)%10==0)  a/=10;
        while(abs(b)%10==0)  b/=10;
        if(abs(a)<10&&abs(b)<10){
            cout << ans/10 << endl;
            return 0;
        }
    }
    if(ans >= -99999999 && ans <= 99999999) cout << ans << endl;
    else    cout << "E\n";
    return 0;
}
0