結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
takayuki
|
| 提出日時 | 2018-08-07 12:34:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 640 bytes |
| コンパイル時間 | 4,388 ms |
| コンパイル使用メモリ | 223,864 KB |
| 最終ジャッジ日時 | 2025-01-06 12:18:20 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
#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;
}
takayuki