結果

問題 No.722 100×100=1000
コンテスト
ユーザー michonz4
提出日時 2019-12-28 16:56:08
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 450 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 139 ms
コンパイル使用メモリ 38,976 KB
最終ジャッジ日時 2026-02-22 05:05:18
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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