最近不知为何,心烦意乱,各种事情都能引起我的烦躁, 难道是传说中的经前综合症?? 格老子!!!
或许我知道问题出在哪儿,,,是啊,青春期来的晚啊,情窦初开,,,遇到了感情问题了恐怕,,各中吃醋??? 2333333333333333
何不放烂形骸,心出穹顶外
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <ctype.h>
#include <vector>
#include <algorithm>
#include <sstream>
#define PI acos(-1.0)
#define in freopen("in.txt", "r", stdin)
#define out freopen("out.txt", "w", stdout)
using namespace std;
typedef long long ll;
const int maxn = 20 + 7, INF = 0x3f3f3f3f, mod = 1e9 + 7;
int n;
int a[maxn];
int find_() {
if(n <= 0) return 0;
for(int i = 2; i < 1000; ++i) {
int t = i*(i-1)/2;
if(t > n) { n -= (t-i+1); return i-1; }
}
}
int main() {
scanf("%d", &n);
memset(a, 0, sizeof a);
for(int i = 0; i < 26; ++i) {
a[i] = find_();
if(a[i] == 0) break;
}
if(a[0] == 0) cout << 'a' << endl;
for(int i = 0; i < 26 && a[i]; ++i) {
for(int j = 0; j < a[i]; ++j)
printf("%c", (char)(i+'a'));
}
return 0;
}