結果

問題 No.722 100×100=1000
コンテスト
ユーザー takayuki
提出日時 2018-08-07 12:33:39
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 640 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,742 ms
コンパイル使用メモリ 234,596 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-03 13:35:59
合計ジャッジ時間 5,110 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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