結果
問題 | No.722 100×100=1000 |
ユーザー |
![]() |
提出日時 | 2018-08-04 00:21:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 716 bytes |
コンパイル時間 | 804 ms |
コンパイル使用メモリ | 76,392 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:24:24 |
合計ジャッジ時間 | 1,690 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<algorithm> #include<cmath> #include<queue> #include<vector> #include<stack> using namespace std; #define REP(i,n) for(int i=0;(i)<(n);(i)++) #define ll long long #define int long long int N; int A, B; int ans; signed main() { cin >> A >> B; if (A == 0 || B == 0) { cout << 0 << endl; return 0; } int tmpA = abs(A); int tmpB = abs(B); while (tmpA % 10 == 0) tmpA /= 10; while (tmpB % 10 == 0) tmpB /= 10; if (A % 100 == 0 && tmpA < 10 && B % 100 == 0 && tmpB < 10) { ans = A*B / 10; cout << ans << endl; return 0; } else ans = A*B; if (abs(ans) >= 1e8) cout << 'E' << endl; else cout << ans << endl; return 0; }