結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-21 10:48:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 461 bytes |
| コンパイル時間 | 958 ms |
| コンパイル使用メモリ | 94,244 KB |
| 最終ジャッジ日時 | 2025-02-16 12:00:28 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 6 |
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
using namespace std;
int main()
{
long long a, b;
cin >> a >> b;
string sa = to_string(a), sb = to_string(b);
if (a < 0) sa.erase(0, 1);
if (b < 0) sb.erase(0, 1);
if (!(abs(a)%(int)pow(10,sa.size() -1)) && !(abs(b)%(int)pow(10,sb.size() -1))) cout << a * b /10 << endl;
else cout << ((abs(a*b) < 100000000) ? to_string(a*b) : "E") << endl;
}
kpinkcat