結果
問題 | No.722 100×100=1000 |
ユーザー | sashiming |
提出日時 | 2018-10-10 17:05:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 506 bytes |
コンパイル時間 | 1,729 ms |
コンパイル使用メモリ | 168,204 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:40:07 |
合計ジャッジ時間 | 2,796 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool check(ll x){ int cnt = 0; if(x == 0) return false; while(x % 10 == 0){ x /= 10; cnt++; } return x >= -9 and x <= 9 and cnt >= 2; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll a, b, ans; cin >> a >> b; if(check(a) and check(b)){ ans = a * b / 10; cout << ans << endl; return 0; } ans = a * b; if(ans >= -99999999 and ans <= 99999999) cout << ans << endl; else cout << 'E' << endl; return 0; }