結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-27 04:31:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| コンパイル時間 | 2,158 ms |
| コンパイル使用メモリ | 194,664 KB |
| 最終ジャッジ日時 | 2025-02-07 17:00:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 6 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
ll A,B; cin >> A >> B;
auto f = [&](ll X) {
string s = to_string(abs(X));
for(int i = 1; i < int(s.size()); i++) if(s[i] != '0') return false;
return true;
};
ll C = A * B;
if(f(A) && f(B)) {
if(C % 10 == 0) {
cout << C / 10 << endl;
} else {
cout << C << endl;
}
} else {
if(-99999999 <= C && C <= +99999999) {
cout << C << endl;
} else {
cout << "E" << endl;
}
}
}