結果

問題 No.722 100×100=1000
ユーザー %20%20
提出日時 2018-04-08 06:00:34
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 708 ms
コンパイル使用メモリ 28,544 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-09 10:55:51
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 1 ms
5,376 KB
testcase_23 AC 1 ms
5,376 KB
testcase_24 AC 1 ms
5,376 KB
testcase_25 AC 1 ms
5,376 KB
testcase_26 AC 1 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
testcase_28 AC 1 ms
5,376 KB
testcase_29 AC 1 ms
5,376 KB
testcase_30 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         scanf("%d%d",&A,&B);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%d%d",&A,&B);
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:11: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    5 |         a=abs(A);
      |           ^~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
  +++ |+#include <stdlib.h>
    1 | main(){
main.c:20:17: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |                 printf("%lld\n",(long long)A*B/10);
      |                 ^~~~~~
main.c:20:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:18: warning: implicit declaration of function 'llabs' [-Wimplicit-function-declaration]
   21 |         }else if(llabs((long long)A*B)<=99999999){
      |                  ^~~~~
main.c:21:18: note: include '<stdlib.h>' or provide a declaration of 'llabs'
main.c:21:18: warning: incompatible implicit declaration of built-in function 'llabs' [-Wbuiltin-declaration-mismatch]
main.c:21:18: note: include '<stdlib.h>' or provide a declaration of 'llabs'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("%d\n",A*B);
    

ソースコード

diff #

main(){
	int A,B,a,b,n,m;
	scanf("%d%d",&A,&B);
	
	a=abs(A);
	n=0;
	while(a!=0 && a%10==0){
		++n;
		a/=10;
	}
	
	b=abs(B);
	m=0;
	while(b!=0 && b%10==0){
		++m;
		b/=10;
	}
	
	if(1<=a&&a<=9 && n>=2 && 1<=b&&b<=9 && m>=2){
		printf("%lld\n",(long long)A*B/10);
	}else if(llabs((long long)A*B)<=99999999){
		printf("%d\n",A*B);
	}else{
		printf("E\n");
	}
}
0