結果

問題 No.722 100×100=1000
ユーザー GB
提出日時 2018-09-22 15:14:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 524 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 69,328 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 11:10:16
合計ジャッジ時間 1,474 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 17 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main() {

	int A, B;
	cin >> A >> B;
	string astr = to_string(A);
	string bstr = to_string(B);
	if (A%100==0 && B%100==0 ) {
		int size = astr.size() + bstr.size()-1;
		while (A>10) {
			A /= 10;
		}
		while (B>10) {
			B /= 10;
		}
		int ans = A * B;
		cout << ans;
		for (int i = 0;i < size;i++) {
			cout << 0;
		}

		return 0;
	}
	else {
		if (astr.size()+bstr.size() > 8)cout << 'E' << endl;
		else cout << A * B << endl;;
	}

	return 0;
}
0