結果

問題 No.722 100×100=1000
ユーザー Bantako
提出日時 2018-12-27 18:56:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 584 bytes
コンパイル時間 1,576 ms
コンパイル使用メモリ 170,368 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 11:18:57
合計ジャッジ時間 2,449 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
using namespace std;
typedef long long ll;
int INF = (1LL << 30) - 1;
int MOD = 1e9+7;
string to_str(ll A){
    stringstream ss;
    ss << A;
    return ss.str();
}
main(){
    ll A,B;
    cin >> A >> B;
    string S = to_str(abs(A)), T = to_str(abs(B));
    if(S.size() >= 3 && S[1] == '0' && T.size() >= 3 && T[1] == '0'){
        cout << A * B / 10 << endl;
    }else{
        if(abs(A * B) < 100000000LL){
            cout << A * B << endl;
        }else{
            cout << "E" << endl;
        }
    }
}
0