結果
問題 |
No.722 100×100=1000
|
ユーザー |
|
提出日時 | 2018-09-22 15:42:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 645 bytes |
コンパイル時間 | 631 ms |
コンパイル使用メモリ | 69,848 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-12 11:10:36 |
合計ジャッジ時間 | 1,554 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 WA * 7 |
ソースコード
#include<iostream> #include<string> #include<math.h> using namespace std; int main() { int A, B; cin >> A >> B; if (A%100==0 && B%100==0 ) { string astr = to_string(A); string bstr = to_string(B); int size = 0; if (A<0 || B<0) size = astr.size() + bstr.size() - 3; else size = astr.size() + bstr.size() - 2; while (A>=10 || A<=-10) { A /= 10; } while (B>=10 || B<=-10) { B /= 10; } int ans = A * B; cout << ans; for (int i = 0;i < size-1;i++) { cout << 0; } return 0; } else { string abstr = to_string(A*B); if (abstr.size()>8)cout << 'E' << endl; else cout << A * B << endl; } return 0; }