結果

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

ソースコード

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++;
	}
	while (y >= 10) {
		if (y % 10)fb = 1;
		y /= 10;
		r++;
	}
	
	if (!fa && !fb) {
		cout << x*y;
		for (int i = 0; i < r - 1; i++) {
			cout << "0";
		}
	}
	else {
		if (abs(a*b) >= 10000000)cout << 'E' << endl;
		else cout << a*b;
	}




	return 0;
}
0