結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
d_sei
|
| 提出日時 | 2019-09-07 20:43:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 595 bytes |
| コンパイル時間 | 662 ms |
| コンパイル使用メモリ | 81,876 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-12 12:11:54 |
| 合計ジャッジ時間 | 1,594 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 19 WA * 8 |
ソースコード
#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
#include<iomanip>
#include<queue>
using namespace std;
typedef long long int lont;
int main() {
int a, b;
cin >> a >> b;
int A, B;
A = a;
B = b;
int ca = 0;
int cb = 0;
for (int ia = 0; ia < 20; ia++) {
if (A % 10) {
ca++;
}
A /= 10;
}
for (int ib = 0; ib < 20; ib++) {
if (B % 10) {
cb++;
}
B /= 10;
}
if (ca == 1 && cb == 1) {
cout << a * b / 10 << endl;
}
else {
if (a * b < -99999999 || a * b>99999999) {
cout << 'E' << endl;
}
else {
cout << a * b << endl;
}
}
}
d_sei