結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
youthfuldays072
|
| 提出日時 | 2018-08-08 11:09:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 725 bytes |
| コンパイル時間 | 858 ms |
| コンパイル使用メモリ | 69,576 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 10:53:07 |
| 合計ジャッジ時間 | 1,476 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 6 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<set>
#include<queue>
#include<list>
#include<stdio.h>
#include<stdlib.h>
#include<map>
using namespace std;
bool isExplike(long long a) {
a = abs(a);
if (a == 0) {
return false;
}
while (a >= 10) {
if (a % 10 == 0) {
a /= 10;
}
else {
return false;
}
}
return true;
}
int main() {
long long a, b;
cin >> a >> b;
bool isE = false;
if (isExplike(a) && isExplike(b)) {
isE = true;
}
long long ans = a*b;
if (isE) {
cout << ans/10 << endl;
return 0;
}
if (ans >= -99999999 && ans <= 99999999) {
cout << ans << endl;
}
else {
cout << "E" << endl;
}
return 0;
}
youthfuldays072