結果

問題 No.722 100×100=1000
ユーザー ohreitetsuohreitetsu
提出日時 2018-08-20 21:44:38
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 512 bytes
コンパイル時間 600 ms
コンパイル使用メモリ 64,240 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-20 15:20:01
合計ジャッジ時間 4,505 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,576 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 3 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 TLE -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
	LL A;
	LL B;
	cin>>A>>B;
	LL C=A*B;

	int Anum=0;
	int Bnum=0;
	if (A<0){
		A=-A;
	}
	if (B<0){
		B=-B;
	}
	if (A<=9 && B<=9){
		cout<<C<<endl;
		return 0;
	}
	while (A%10==0){
		A/=10;
		Anum++;
	}
	while (B%10==0){
		B/=10;
		Bnum++;
	}
	if (A<10 && B<10 && Anum>=2 &&Bnum>=2){
		cout<<C/10<<endl;
		return 0;
	}
	if (C>=-99999999 && C<=99999999){
		cout<<C<<endl;
		return 0;
	}

	cout<<"E"<<endl;
	return 0;
}
0