結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2018-08-03 22:39:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 598 bytes |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 78,180 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 19:20:48 |
| 合計ジャッジ時間 | 1,938 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;
bool f(int a) {
int b = abs(a);
while (b != 0 && b % 10 == 0) b /= 10;
return a % 100 == 0 && 1 <= b && b <= 9;
}
int main() {
ll a, b;
cin >> a >> b;
ll c = a * b;
if (f(a) && f(b)) {
cout << c / 10 << endl;
} else {
if (abs(c) <= 99999999) {
cout << c << endl;
} else {
cout << 'E' << endl;
}
}
return 0;
}
merom686