結果
問題 | No.722 100×100=1000 |
ユーザー |
|
提出日時 | 2020-06-13 14:39:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 1,799 ms |
コンパイル使用メモリ | 168,268 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:55:59 |
合計ジャッジ時間 | 3,057 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) using namespace std; typedef long long ll; bool f(ll n){ string s=to_string(n); for(ll i=1; i<s.size(); i++){ if(s[i]!='0') return false; } if(s.size()<=2) return false; else return true; } int main(){ ll a,b; cin>>a>>b; if(f(abs(a))&&f(abs(b))){ cout << (a*b)/10 << endl; return 0; } if(a*b>99999999||a*b<-99999999) cout << "E" << endl; else cout << a*b << endl; }