結果

問題 No.722 100×100=1000
ユーザー hum_ophum_op
提出日時 2018-08-22 11:24:38
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 725 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 29,312 KB
実行使用メモリ 13,756 KB
最終ジャッジ日時 2024-04-20 15:20:52
合計ジャッジ時間 3,769 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

long long int habs(long long int n){ return n > 0 ? n : -n; }

int main(){
        long long int A, B;
        long long int tmp;
        scanf("%lld %lld", &A, &B);

        tmp = habs(A);
        while(tmp % 10 == 0){
                tmp /= 10;
        }
        if(tmp > 9){
                goto calc;
        }

        tmp = habs(B);
        while(tmp % 10 == 0){
                tmp /= 10;
        }
        if(tmp > 9){
                goto calc;
        }else {
                goto ansan;
        }

calc:
        A *= B;
        if(habs(A) > 99999999) printf("E\n");
        else printf("%lld\n", A);
        return 0;
ansan:
        A *= B;
        printf("%lld\n", A / 10);
        return 0;
}
0