(D) Diane

闭着眼睛过的

// Problem: D. Diane
// Contest: Codeforces - Codeforces Round #735 (Div. 2)
// URL: https://codeforces.com/problemset/problem/1554/D
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include<iostream>
#include<stdio.h>
#include<cstdio>
#include<string>
#include<ctime>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<stack>
#include<climits>
#include<queue>
#include<map>
#include<set>
#include<sstream>
#include<cassert>
#include<bitset>
#include<list>
#include<unordered_map>
using namespace std;
#define lowbit(x) (x&-x)
#define dbg(x) cout << #x << " = " << x << endl
#define rep(i,l,r) for(int i = l; i <= r; i++)
typedef long long ll;
typedef unsigned long long ull;

template<typename T>
inline void read(T &x)
{T f=1;x=0;char ch=getchar();while(0==isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}while(0!=isdigit(ch)) x=(x<<1)+(x<<3)+ch-'0',ch=getchar();x*=f;}
template<typename T>
inline void write(T x)
{if(x<0){x=~(x-1);putchar('-');}if(x>9)write(x/10);putchar(x%10+'0');}

const int inf=0x3f3f3f3f;
const int N=1e6+100;
int arr[N];

void solve()
{
	int n;
	cin >> n;
	int t = 'a';
	if(n==1) 
	{
	    cout << "a" << endl;
	    return ;
	}
	if(n&1)
	{
		for(int i = 1; i <= (n-2)/2 + 1; i ++)
			cout << "a";
		cout << "bc";
		for(int i = 1; i < (n-1)/2; i++)
		 	cout << "a";
		cout << endl;
		return ;
	}else{
		for(int i = 1; i <= n/2-1; i++)
			cout << "a";
		cout << "b";
		for(int i = 1; i <= n/2; i++)
			cout << "a";
		cout << endl;
	}
}

int main()
{

	ios::sync_with_stdio(false);cin.tie(0);
	int Case;cin >> Case;
	while(Case--)
		solve();
	return 0;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值