結果
問題 | No.722 100×100=1000 |
ユーザー |
![]() |
提出日時 | 2020-02-27 00:00:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 1,888 ms |
コンパイル使用メモリ | 166,356 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 19:52:12 |
合計ジャッジ時間 | 2,576 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include<bits/stdc++.h> int main(){ long long a,b;std::cin>>a>>b; long long ans=a*b; if(!a||!b){ std::cout<<0<<std::endl; return 0; } int x=0,y=0; while(a%10==0)a/=10,x++; while(b%10==0)b/=10,y++; if(-10<a&&a<10&&-10<b&&b<10&&1<x&&1<y){ std::cout<<ans/10<<std::endl; }else{ if(1e8<=std::abs(ans)){ std::cout<<"E"<<std::endl; }else{ std::cout<<ans<<std::endl; } } }