#include #define CALC_MAX 99999999 #define CALC_MIN -99999999 struct Rise { int value; int mul; }; // A(10^n)形式を求める Rise Rise10(int val) { Rise ret; ret.value = val; ret.mul = 0; if(val == 0) return ret; while(1) { if((ret.value % 10) != 0) return ret; ret.value /= 10; ret.mul++; } } int main() { int a, b; Rise ar, br; std::cin >> a >> b; ar = Rise10(a); br = Rise10(b); if((ar.mul > 0) && (br.mul > 0)) { int loop = ar.mul + br.mul - 2; std::cout << (ar.value * br.value); for(int i = 0; i < loop; i++) { std::cout << "0"; } return 0; } else { long long ans = a * b; if((ans > CALC_MAX) || (ans < CALC_MIN)) { std::cout << "E"; return 0; } std::cout << ans; return 0; } }