結果

問題 No.2609 Decreasing GCDs
ユーザー inksamuraiinksamurai
提出日時 2024-01-20 01:07:50
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 956 bytes
コンパイル時間 2,347 ms
コンパイル使用メモリ 203,304 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-20 01:07:54
合計ジャッジ時間 3,322 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 1 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 1 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 1 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 AC 2 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
testcase_16 AC 2 ms
6,676 KB
testcase_17 AC 2 ms
6,676 KB
testcase_18 AC 2 ms
6,676 KB
testcase_19 AC 2 ms
6,676 KB
testcase_20 AC 2 ms
6,676 KB
testcase_21 AC 2 ms
6,676 KB
testcase_22 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int ll
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define rng(i,c,n) for(int i=c;i<n;i++)
#define fi first
#define se second
#define pb push_back
#define sz(a) (int)a.size()
#define vec(...) vector<__VA_ARGS__>
#define _48SMghu ios::sync_with_stdio(0),cin.tie(0)
using ll=long long;
using pii=pair<int,int>;
using vi=vector<int>;
void print(){cout<<'\n';}
template<class h,class...t>
void print(const h&v,const t&...u){cout<<v<<' ',print(u...);}

int prime(int n){
	for(int i=2;i<sqrt(n);i++){
		if(n%i==0){
			return 0;
		}
	}
	return 1;
}

void slv(){
	int n=25;
	vi a(n);
	int x=3;
	rep(i,n){
		a[i]=(1<<(n-1-i));
		if(i==0) continue;
		while(!prime(x)) x+=1;
		a[i]*=x;
		x*=2;
	}
	// rep(i,n){
	// 	cout<<a[i]<<" ";
	// }
	int l;
	cin>>l;
	rep(i,l){
		cout<<a[i]<<" ";
	}
	// rep(i,n){
	// 	cout<<a[i]<<" ";
	// }
	print();
}

signed main(){
_48SMghu;
	slv();
}
0