結果

問題 No.1472 作為の和
ユーザー kotatsugamekotatsugame
提出日時 2021-04-09 21:41:56
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 635 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 69,460 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-07 10:31:26
合計ジャッジ時間 1,341 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:14:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
   14 | main()
      | ^~~~

ソースコード

diff #

#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;
	*/
}
0