結果

問題 No.722 100×100=1000
ユーザー SSRS
提出日時 2020-08-26 07:33:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 74,524 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:58:17
合計ジャッジ時間 1,647 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
using namespace std;
int main(){
	int A, B;
	cin >> A >> B;
	set<int> st;
	for (int i = 1; i <= 9; i++){
		int tmp = i * 10;
		for (int j = 0; j < 6; j++){
			tmp *= 10;
			st.insert(tmp);
			st.insert(- tmp);
		}
	}
	if (st.count(A) && st.count(B)){
		cout << (long long) A * B / 10 << endl;
	} else if (abs((long long) A * B) < 100000000){
		cout << A * B << endl;
	} else {
		cout << 'E' << endl;
	}
}
0