結果
問題 | No.722 100×100=1000 |
ユーザー |
![]() |
提出日時 | 2018-08-03 22:26:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 429 bytes |
コンパイル時間 | 2,537 ms |
コンパイル使用メモリ | 166,292 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:18:34 |
合計ジャッジ時間 | 2,834 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int a,b; cin>>a>>b; if(a==0||b==0) return cout<<0<<endl,0; Int c=abs(a),d=abs(b); while(c%10==0) c/=10; while(d%10==0) d/=10; if(abs(a)>=100&&abs(b)>=100&&c<10&&d<10) return cout<<a*b/10<<endl,0; Int L=-99999999,R=99999999; Int x=a*b; if(L<=x&&x<=R) cout<<x<<endl; else cout<<"E"<<endl; return 0; }