結果

問題 No.722 100×100=1000
ユーザー michonz4
提出日時 2019-12-28 16:56:08
言語 C
(gcc 13.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 450 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 29,568 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 12:14:50
合計ジャッジ時間 1,153 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
  long long a, b, ans, judge=0;
  scanf("%lld %lld", &a, &b);

  ans=a*b;
  
  if (a/10!=0 && a!=10) {
    while (a) {
      if (a%10!=0) judge++;
      a/=10;
    }
  }

  if (b/10!=0 && b!=10) {
    while (b) {
      if (b%10!=0) judge++;
      b/=10;
    }
  }

  if (judge==2) printf("%lld\n", ans/10);
  else {
    if (ans>99999999 || ans<-99999999) printf("E\n");
    else printf("%d\n", ans);
  }
  return 0;
}
0