結果

問題 No.722 100×100=1000
ユーザー sggkshio
提出日時 2018-11-28 01:13:31
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 871 bytes
コンパイル時間 754 ms
コンパイル使用メモリ 81,768 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 11:16:39
合計ジャッジ時間 1,482 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
using namespace std;

//#include<bits/stdc++.h>

int main() {
	
	long long int a, b;
	cin >> a >> b;
	long long int x = a, y = b;
	bool fa = 0, fb = 0;
	int r = 0;
	while (x >= 10) {
		if (x % 10)fa = 1;
		x /= 10;
		r++;
	}
	if (a == 10)r++;
	while (y >= 10) {
		if (y % 10)fb = 1;
		y /= 10;
		r++;
	}
	if (b == 10)r++;
	
	if (!fa && !fb) {
		cout << x*y;
		for (int i = 0; i < r - 1; i++) {
			cout << "0";
		}
		cout << endl;
	}
	else {
		if (abs(a*b) >= 100000000)cout << 'E' << endl;
		else cout << a*b<<endl;
	}




	return 0;
}
0