FJNU字符串 |
Time Limit: 1 Seconds Memory Limit: 32768 K Total Submit:370 Accepted:101 |
Description 按要求输出字符串"FJNU"^_^ . Input 第一行只有一个整数n(1<=n<=100),代表测试数据的个数 Output 对于每个测试数据,输出格式见sample output Sample Input
2 3 2
Sample Output
FJNU FJNUFJNU FJNUFJNU FJNUFJNUFJNU FJNUFJNUFJNU FJNUFJNUFJNU FJNU FJNUFJNU FJNUFJNU
Hint 最后一个测试数据后面不留空行 . Source PhoenixWright@fjnu |
code:
#include <iostream>
using namespace std;
int main()
{
int n=0;
cin>>n;
int* test = new int[n];
for (int i=0; i<n; i++)
{
cin>>test[i];
}
for (i=0; i<n; i++)
{
for (int j=0; j<test[i]; j++)
{
for (int k=0; k<=j;k++)
{
for (int k1=0; k1<=j; k1++)
{
cout<<"FJNU";
}
cout<<endl;
}
}
cout<<endl;
}
delete test;
cin.get();
cin.get();
return 0;
}