結果

問題 No.722 100×100=1000
ユーザー youthfuldays072
提出日時 2018-08-08 11:12:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 724 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 69,584 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:28:51
合計ジャッジ時間 1,763 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<set>
#include<queue>
#include<list>
#include<stdio.h>
#include<stdlib.h>
#include<map>

using namespace std;
bool isExplike(long long a) {

	a = abs(a);

	if (a<100) {
		return false;
	}

	while (a >= 10) {
		if (a % 10 == 0) {
			a /= 10;
		}
		else {
			return false;
		}
	}



	return true;
}

int main() {
	long long  a, b;
	cin >> a >> b;

	bool isE = false;
	if (isExplike(a) && isExplike(b)) {
		isE = true;
	}

	long long ans = a*b;

	
	if (isE) {
		cout << ans/10 << endl;
		return 0;
	}

	if (ans >= -99999999 && ans <= 99999999) {
		cout << ans << endl;
	}
	else {
		cout << "E" << endl;
	}
	


	return 0;
}

0