結果

問題 No.722 100×100=1000
ユーザー kikage
提出日時 2020-04-02 00:15:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 55,064 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:54:13
合計ジャッジ時間 1,670 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
bool is_100(long long x){
    if(x==0)return false;
    if(x<0)x=-x;
    int n=0;
    while(x%10==0){
        x/=10;n++;
    }
    if(x<10 && n>1)return true;
    else return false;
}

int main(){
    long long A,B;
    cin >> A >> B;
    if(is_100(A) && is_100(B)){
        cout << A*B/10 << endl;
    }else{
        if(-1e8<A*B && A*B<1e8)cout << A*B <<endl;
        else cout << "E" << endl;
    }
    return 0;
}
0