結果

問題 No.722 100×100=1000
ユーザー lunnearlunnear
提出日時 2019-01-07 05:11:48
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 782 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 55,180 KB
実行使用メモリ 13,760 KB
最終ジャッジ日時 2024-04-20 15:38:42
合計ジャッジ時間 3,922 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,760 KB
testcase_01 WA -
testcase_02 AC 1 ms
6,944 KB
testcase_03 WA -
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
6,944 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 <iostream>

#define MAX 99999999

int main(void)
{
    long long a, b;
    std::cin >> a >> b;
    
    if(((a % 100) == 0) && ((b % 100) == 0))
    {
        long long aa = abs(a), bb = abs(b);
        while(((aa % 10) == 0) || ((bb % 10) == 0))
        {
            if((aa % 10) == 0)
                aa /= 10;
            
            if((bb % 10) == 0)
                bb /= 10;
        }
        std::cout << aa << " "<< bb << std::endl;
        if((aa <= 9) && (bb <= 9))
        {
            std::cout << ((a * b) / 10) << std::endl;
            return 0;
        }
    }
    
    if((long long)abs(a) * (long long)abs(b) > MAX)
    {
        std::cout << "E" << std::endl;
        return 0;
    }
    
    

    std::cout << (a * b) << std::endl;
    return 0;
}
0