結果

問題 No.722 100×100=1000
ユーザー Ichimiya
提出日時 2020-07-24 21:47:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 1,677 ms
コンパイル使用メモリ 168,012 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-25 21:03:16
合計ジャッジ時間 2,817 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 20 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int64_t A, B;
	cin >> A >> B;

	string a, b;
	a = to_string(A);
	b = to_string(B);
	int64_t ans = A * B;

	if ((count(a.begin(), a.end(), '0') == a.size() - 1) &&
		(count(b.begin(), b.end(), '0') == b.size() - 1)) {
		ans /= 10;
	}
	else {
		if (ans / 100000000 != 0) {
			cout << "E" << endl;
			return 0;
		}
	}

	cout << ans << endl;
}
0