提交时间:2024-08-21 16:22:37
运行 ID: 180589
#include <bits/stdc++.h> using namespace std; long long sum = 1; int n, a[1100000]; bool cmp(int a, int b){ return a > b; } int main(){ cin >> n; a[1] = 2; for(int i = 2; i <= n; i++){ a[i] = 2 * a[i - 1]; } sort(a + 1, a + n + 1, cmp); for(int i = 1; i <= n; i++){ cout << a[i] << endl; } }