結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
memmemmi
|
| 提出日時 | 2018-11-29 14:15:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,122 bytes |
| コンパイル時間 | 917 ms |
| コンパイル使用メモリ | 110,084 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-12 11:17:24 |
| 合計ジャッジ時間 | 1,810 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 6 |
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <iomanip>
#include <array>
#include <numeric>
#include <regex>
#include <bitset>
#include <deque>
using namespace std;
typedef long long ll;
typedef pair<int, int> p_ii;
const int INF = 1e9;
const double PI = acos(-1.0);
const ll MOD = 1e9 + 7;
ll dig(ll x){
x=abs(x);
int d = 0;
while(x!=0){
d++;
x/=10;
}
ll ret = 1;
for (int i = 0; i < d-1; i++) {
ret*=10;
}
return ret;
}
int main() {
ll A, B;
cin>>A>>B;
ll diA= dig(A), diB= dig(B);
if(A!=0 && B!=0 && abs(A)%diA==0 && abs(B)%diB==0){
cout<<A*B/10<<endl;
}
else{
ll res=A*B;
if(res<-99999999 || res>99999999){
cout<<'E'<<endl;
}else{
cout<<A*B<<endl;
}
}
return 0;
}
memmemmi