結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-08 07:07:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 635 bytes |
| コンパイル時間 | 856 ms |
| コンパイル使用メモリ | 83,252 KB |
| 最終ジャッジ日時 | 2025-01-11 00:07:09 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <string>
#include <map>
#include <numeric>
using namespace std;
typedef long long int ll;
bool chaek(ll a,ll b){
if(a==0||b==0)return false;
int n=0,m=0;
while(a%10==0)a/=10,n++;
while(b%10==0)b/=10,m++;
if(n>=2&&m>=2&&abs(a)<=9&&abs(b)<=9)return true;
else return false;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll a,b; cin >> a >> b;
ll res=a*b;
if(chaek(a,b)){
printf("%lld\n",res/10);
}
else{
if(-99999999<=res&&res<=99999999){
printf("%lld\n",res);
}
else{
printf("E\n");
}
}
}