結果

問題 No.722 100×100=1000
ユーザー Mcpu3Mcpu3
提出日時 2018-08-04 11:34:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 588 bytes
コンパイル時間 2,143 ms
コンパイル使用メモリ 71,872 KB
実行使用メモリ 56,560 KB
最終ジャッジ日時 2023-08-28 15:48:16
合計ジャッジ時間 7,128 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,248 KB
testcase_01 AC 118 ms
56,064 KB
testcase_02 AC 118 ms
55,920 KB
testcase_03 AC 118 ms
56,316 KB
testcase_04 AC 120 ms
56,180 KB
testcase_05 AC 117 ms
55,896 KB
testcase_06 AC 117 ms
55,860 KB
testcase_07 AC 118 ms
55,928 KB
testcase_08 AC 117 ms
55,748 KB
testcase_09 AC 118 ms
55,920 KB
testcase_10 AC 117 ms
56,560 KB
testcase_11 AC 118 ms
55,960 KB
testcase_12 AC 119 ms
55,948 KB
testcase_13 AC 119 ms
55,972 KB
testcase_14 AC 117 ms
55,936 KB
testcase_15 AC 118 ms
55,992 KB
testcase_16 AC 120 ms
56,064 KB
testcase_17 AC 119 ms
55,756 KB
testcase_18 AC 119 ms
55,792 KB
testcase_19 AC 117 ms
56,112 KB
testcase_20 AC 117 ms
55,868 KB
testcase_21 AC 118 ms
55,924 KB
testcase_22 AC 117 ms
55,768 KB
testcase_23 AC 120 ms
55,776 KB
testcase_24 AC 118 ms
56,048 KB
testcase_25 AC 118 ms
56,208 KB
testcase_26 AC 118 ms
56,076 KB
testcase_27 AC 117 ms
55,712 KB
testcase_28 AC 120 ms
56,288 KB
testcase_29 AC 117 ms
56,304 KB
testcase_30 AC 117 ms
56,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long a=stdIn.nextLong(),b=stdIn.nextLong(),c,d,f=0;
		if(a>0) c=a;
		else c=-a;
		do {
			if(c%10!=0) f++;
			c/=10;
		}while(c>9);
		if(b>0) d=b;
		else d=-b;
		do {
			if(d%10!=0) f++;
			d/=10;
		}while(d>9);
		if(a>0) c=a;
		else c=-a;
		if(b>0) d=b;
		else d=-b;
		if(100>c||100>d) f++;
		if(f>0) {
			if(a*b>=-99999999&&99999999>=a*b) System.out.print(a*b);
			else System.out.print("E");
		}
		else System.out.print(a*b/10);
	}
}
0