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