結果

問題 No.722 100×100=1000
ユーザー magmag
提出日時 2020-07-06 04:27:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 636 bytes
コンパイル時間 1,552 ms
コンパイル使用メモリ 168,444 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 20:23:32
合計ジャッジ時間 3,107 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 RE -
testcase_10 WA -
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 RE -
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 RE -
testcase_22 AC 2 ms
4,348 KB
testcase_23 RE -
testcase_24 WA -
testcase_25 AC 1 ms
4,348 KB
testcase_26 AC 1 ms
4,348 KB
testcase_27 AC 2 ms
4,348 KB
testcase_28 AC 1 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;
using ll=long long;
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) rep2(i,0,n)

int main(){
  cin.tie(nullptr);ios_base::sync_with_stdio(false);
  ll a,b;cin>>a>>b;
  if((a<=100||a>=100)&&(b<=100||b>=100)){
    if(((a>0)&&a%((to_string(a).size()-1)*10)==0)||((a<0)&&a%((to_string(a).size()-2)*10)==0)&&(((b>0)&&b%((to_string(b).size()-1)*10)==0)||((b<0)&&b%((to_string(b).size()-2)*10)==0)
      )){
    cout<<a*b/10<<endl;
    }else if(a*b<-99999999||a*b>99999999){
      cout<<"E"<<endl;
    }else{
      cout<<a*b<<endl;
    }
  }else{
    cout<<a*b<<endl;
  }
}
0