結果
問題 |
No.722 100×100=1000
|
ユーザー |
|
提出日時 | 2018-08-11 10:29:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 1,918 ms |
コンパイル使用メモリ | 166,036 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:30:20 |
合計ジャッジ時間 | 3,351 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; bool isSimple(long long N){ if (N == 0) return false; N = abs(N); if ((N % 100LL) != 0) return false; while ((N % 10LL) == 0){ N /= 10LL; } return N <= 9LL; } int main() { cin.tie(0); ios::sync_with_stdio(false); long long A, B; cin >> A >> B; if (isSimple(A) and isSimple(B)){ cout << A * B / 10LL << endl; }else{ long long AB = A * B; if (-99999999 <= AB and AB <= 99999999){ cout << AB; }else{ cout << 'E'; } } return 0; }