結果
問題 |
No.722 100×100=1000
|
ユーザー |
![]() |
提出日時 | 2023-08-21 10:50:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 977 ms |
コンパイル使用メモリ | 95,276 KB |
最終ジャッジ日時 | 2025-02-16 12:00:32 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#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 (sa.size() > 2 && sb.size() > 2 && !(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; }