結果
問題 | No.1472 作為の和 |
ユーザー |
|
提出日時 | 2021-04-09 21:41:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 635 bytes |
コンパイル時間 | 771 ms |
コンパイル使用メモリ | 69,760 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 04:44:44 |
合計ジャッジ時間 | 1,305 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
main.cpp:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 14 | main() | ^~~~
ソースコード
#include<iostream>#include<vector>#include<algorithm>using namespace std;int N;vector<long>ans;int mx;int pw(int n){int ret=1;while(n--)ret*=10;return ret;}main(){cin>>N;if(N==0)cout<<"9 1"<<endl;else{int t=8;for(int i=0;i<N;i++)t+=18;cout<<t<<" 1"<<endl;}/*int L=1;int R=3.14199265358979*pw(N);cout<<L<<" "<<R<<endl;cout<<endl;for(int a=L;a<=R;a++)for(int b=a;b<=R;b++){long t=(long)a*b;long u=t;int s=0;while(u)s+=u%10,u/=10;if(mx<s){ans.clear();mx=s;}if(mx==s)ans.push_back(t);}cout<<mx<<" "<<ans.size()<<endl;for(long t:ans)cout<<t<<endl;*/}