結果

問題 No.722 100×100=1000
ユーザー takayuki
提出日時 2018-08-07 12:33:39
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 640 bytes
コンパイル時間 4,948 ms
コンパイル使用メモリ 213,788 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:29:03
合計ジャッジ時間 6,036 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<stdlib.h>
#include<time.h>
#include<math.h>
#include<string.h>
#include<algorithm>
#include<queue>
#include<map>
#include<iomanip>
#include<regex>

using namespace std;

int main(void){
 char s[50];
 char s1[50];
 long long int A,B;
 long long int mul=0;
 int error=0;
 cin>>s; 
 cin>>s1;
 
 regex Regex("^-{0,1}[1-9]0*0{2}$");
 if(regex_search(s,Regex) && regex_search(s1,Regex)){
  A=atol(s);
  B=atol(s1);
  mul=A*B/10;
 }
 else {
  A=atol(s);
  B=atol(s1);
  mul=A*B;
  if(mul<-99999999 || mul>99999999)error=1;
 }
 
 if(error==0)std::cout<<mul<<std::endl;
 else std::cout<<"E"<<std::endl;
}
0