# PTA|团队程序设计天梯赛-练习集题解（L1）

13 篇文章 1 订阅

### 输入样例：

无


### 输出样例：

Hello World!
#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<iostream>
#define MAX 100
using namespace std;
void swap(int a, int b){
int t = a;
a = b;
b = t;
}
int main(int argc, char const *argv[])
{
cout << "Hello World!" << endl;

}

### L1-002 打印沙漏 （20 分）

*****
***
*
***
*****


### 输入样例:

19 *


### 输出样例:

*****
***
*
***
*****
2
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n, i = 1, j, d, max, sum = 1;
char a;
cin >> n >> a;
while(1)
{
i += 2;
if(sum + i * 2 > n)
{
max = i-2;
d = n - sum;
break;
}
sum += i*2;

}
for(i = max; i >= 1; i -= 2)
{
for(j = 0; j < max; j++)
{
if(j < (max-i) / 2)
cout << " ";
else if(j >= (max+i) / 2)
break;
else
cout << a;
}
cout << endl;
}
for(i = 3; i <= max; i += 2)
{
for(j = 0; j < max; j++)
{
if(j < (max-i) / 2)
cout << " ";
else if(j >= (max+i) / 2)
break;
else
cout << a;
}
cout << endl;
}
cout << d << endl;
}

### 输入样例：

100311


### 输出样例：

0:2
1:3
3:1
#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<iostream>
#include<string.h>
#define MAX 1005
using namespace std;
int main(int argc, char const *argv[])
{
char ch[MAX];
int num[MAX];
memset(ch, 0, sizeof(ch));
memset(num, 0, sizeof(num));
while(scanf("%s", &ch) != EOF){
int len = strlen(ch);
for(int i = 0; i < len; ++i){
num[ch[i]-'0']++;
}
for(int i = 0; i < 10; ++i){
if(num[i] == 0)
continue;
cout << i << ':' << num[i] << endl;
}
}
}

### 输入样例:

150


### 输出样例:

Celsius = 65
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<string.h>
using namespace std;
int main(int argc, char const *argv[])
{
int T;
cin >> T;
int C = 5 * (T - 32) / 9;
cout << "Celsius = " << C <<endl;
return 0;
}

### 输入样例：

4
3310120150912233 2 4
3310120150912119 4 1
3310120150912126 1 3
3310120150912002 3 2
2
3 4


### 输出样例：

3310120150912002 2
3310120150912119 1
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<string.h>
#define MAX 1005
using namespace std;
int main(int argc, char const *argv[])
{
int T;
cin >> T;
char num[MAX][15];
int per[MAX], now[MAX],ru[MAX];
memset(num, 0, sizeof(num));
memset(per, 0, sizeof(per));
memset(now, 0, sizeof(now));
for(int i = 1; i <= T; ++i){
scanf("%s %d %d", &num[i], &per[i], &now[i]);
}
int res = 0;
cin >> res;
for(int i = 1; i <= res; ++i){
cin >> ru[i];
}
for(int i = 1; i <= res; ++i){
for(int j = 1; j <= T; ++j){
if(ru[i] == per[j])
cout << num[j] << " " << now[j] << endl;
}
}

return 0;
}

### 输入样例：

630


### 输出样例：

3
5*6*7

#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<math.h>
#include<iostream>
#define MAX 1005
using namespace std;
int main(int argc, char const *argv[])
{
int T;
cin >> T;
int max = sqrt(T);
for(int len = 12; len >= 1; --len){
for(int start = 2; start <= max; ++start){
long long int ans = 1;
for(int i = start; i - start <= len - 1; ++i)
ans *= i;
if(T % ans == 0){
printf("%d\n%d", len, start);
for(int i =  start + 1; i - start <= len - 1; ++i)
printf("*%d", i);
return 0;
}
}
}
printf("1\n%d", T);
return 0;
}

### L1-007 念数字 （10 分）

0: ling
1: yi
2: er
3: san
4: si
5: wu
6: liu
7: qi
8: ba
9: jiu


### 输入样例：

-600


### 输出样例：

fu liu ling ling
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<string.h>
#define MAX 1005
using namespace std;
int main(int argc, char const *argv[])
{
char num[MAX];
scanf("%s", &num);
int len_num = strlen(num);
for(int i = 0; i < len_num-1; ++i){
if(num[i] == '1')
printf("yi ");
if(num[i] == '2')
printf("er ");
if(num[i] == '3')
printf("san ");
if(num[i] == '4')
printf("si ");
if(num[i] == '5')
printf("wu ");
if(num[i] == '6')
printf("liu ");
if(num[i] == '7')
printf("qi ");
if(num[i] == '8')
printf("ba ");
if(num[i] == '9')
printf("jiu ");
if(num[i] == '0')
printf("ling ");
if(num[i] == '-')
printf("fu ");

}
if(num[len_num-1] == '1')
printf("yi\n");
if(num[len_num-1] == '2')
printf("er\n");
if(num[len_num-1] == '3')
printf("san\n");
if(num[len_num-1] == '4')
printf("si\n");
if(num[len_num-1] == '5')
printf("wu\n");
if(num[len_num-1] == '6')
printf("liu\n");
if(num[len_num-1] == '7')
printf("qi\n");
if(num[len_num-1] == '8')
printf("ba\n");
if(num[len_num-1] == '9')
printf("jiu\n");
if(num[len_num-1] == '0')
printf("ling\n");
if(num[len_num-1] == '-')
printf("fu\n");

return 0;
}

### 输入样例：

-3 8


### 输出样例：

   -3   -2   -1    0    1
2    3    4    5    6
7    8
Sum = 30
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<string.h>
#define MAX 1005
using namespace std;
int main(int argc, char const *argv[])
{
int a, b;
cin >> a >> b;
int sum = 0;
int count = 0;
for(int i = a; i <= b; ++i)
{
sum += i;
count++;
}
int flag = 1;
for(int i = a; i < b; ++i){
if(flag != 5)
{
printf("%5d", i);
flag++;
}
else{
printf("%5d\n", i);
flag = 1;
}
}
printf("%5d\n", b);
printf("Sum = %d\n", sum);
return 0;

}

### 输入样例1：

5
2/5 4/15 1/30 -2/60 8/3


### 输出样例1：

3 1/3


### 输入样例2：

2
4/3 2/3


### 输出样例2：

2


### 输入样例3：

3
1/3 -1/6 1/8


### 输出样例3：

7/24
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<string.h>
#define MAX 1005
using namespace std;
long long int gcd(long long int x, long long int y){
while(y == 0)
return x;
return gcd(y, x%y);
}
int main(int argc, char const *argv[])
{
int T;
cin >> T;
long long int son[MAX], mon[MAX];
for(int i = 0; i < T; ++i){
scanf("%lld/%lld", &son[i], &mon[i]);
}
long long int g = 0;
for(int i = 0; i < T-1; ++i){
if(mon[i] == 0 || mon[i+1] == 0)
continue;
g = mon[i] / gcd(mon[i], mon[i + 1]) * mon[i + 1];
}
if(g != 0){
for(int i = 0; i < T; ++i){
son[i] *= g / mon[i];
}
long long int  sum = 0;
for(int i = 0; i < T; ++i){
//cout << son[i] << endl;
sum += son[i];
}
if(sum % g == 0)
cout << sum/g << endl;
else{
if(sum / g != 0)
cout << sum /g << " ";
long long int temp = sum % g;
long long int res = gcd(temp, g);
cout << temp / res << "/" << g / res << endl;
}
}
else{
cout << 0 << endl;
}
return 0;

}

### 输入样例:

4 2 8


### 输出样例:

2->4->8
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<memory.h>
#include<string.h>
#define MAX 5
using namespace std;
int main(int argc, char const *argv[])
{
int a[MAX];
memset(a, 0, sizeof(a));
for(int i = 0; i < 3; ++i){
cin >> a[i];
}
sort(a, a+3);
for(int i = 0; i < 2; ++i){
cout << a[i] << "->";
}
cout << a[2] <<endl;

return 0;
}

### 输入样例：

I love GPLT!  It's a fun game!
aeiou


### 输出样例：

I lv GPLT!  It's  fn gm!
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
string A, B;
int flag[MAX];
memset(flag, 0, sizeof(flag));
getline(cin, A);  //getline函数，用于读取一行字符串
getline(cin, B);
for(int i = 0; i < A.length(); ++i){
for(int j = 0; j < B.length(); ++j){
if(A[i] == B[j])
flag[i] = 1;
}
}
for(int i = 0; i < A.length(); ++i){
if(flag[i] != 1)
cout << A[i];
}
cout << endl;
return 0;
}

### 输入样例：

5


### 输出样例：

2^5 = 32
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int pow(int a, int b){
int ans = 1;
for(int i = 1; i <= b; ++i){
ans *= a;
}
return ans;
}
int main(int argc, char const *argv[])
{
int n;
cin >> n;
cout << "2^" << n << " = " << pow(2, n);

}

### 输入样例：

3


### 输出样例：

9
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int n;
cin >> n;
int sum = 0;
for(int i = 1; i <= n; ++i){
int ans = 1;
for(int j = i; j >= 1; --j){
ans *= j;
}
sum += ans;
}
cout << sum << endl;
}

### 输入样例：

无


### 输出样例：

This is a simple problem.

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
cout << "This is a simple problem." << endl;
}

### 输入样例：

10 a


### 输出样例：

aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int n;
char ch;
cin >> n >> ch;
double m =  (double)n / 2;
int  tem = (int) n / 2;
if(m - tem >= 0.5){
tem += 1;
}else{
tem = tem;
}
for(int i = 0; i < tem; ++i){
for(int j = 0; j < n; ++j){
printf("%c", ch);
}
printf("\n");
}
}

### L1-016 查验身份证 （15 分）

Z：0 1 2 3 4 5 6 7 8 9 10
M：1 0 X 9 8 7 6 5 4 3 2


### 输入样例1：

4
320124198808240056
12010X198901011234
110108196711301866
37070419881216001X


### 输出样例1：

12010X198901011234
110108196711301866
37070419881216001X


### 输入样例2：

2
320124198808240056
110108196711301862


### 输出样例2：

All passed
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int T;
cin >> T;
int flag[MAX];
memset(flag, 0, sizeof(flag));
int weigh[] = {7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
char card[MAX][20];
memset(card, 0, sizeof(card));
for(int i = 0; i < T; ++i){
scanf("%s", &card[i]);
}
for(int j = 0; j < T; ++j){
for(int i = 0; i < 17; ++i){
if(card[j][i] < '0' || card[j][i] > '9')
flag[j] = 1;
}
}
for(int i = 0; i < T; ++i){
int sum = 0;
for(int j = 0; j < 17; ++j){
sum += weigh[j] * (card[i][j] - '0');
}
int t = sum % 11;
char t_ch;
if(t == 1){
t_ch = '0';
}else if(t == 0){
t_ch = '1';
}else if(t == 2){
t_ch = 'X';
}else if(t == 3){
t_ch = '9';
}else if(t == 4){
t_ch = '8';
}else if(t == 5){
t_ch = '7';
}else if(t == 6){
t_ch = '6';
}else if(t == 7){
t_ch = '5';
}else if(t == 8){
t_ch = '4';
}else if(t == 9){
t_ch = '3';
}else if(t == 10){
t_ch = '2';
}
if(t_ch != card[i][17]){
flag[i] = 1;
}
}
int flag2 = 0;
for(int i = 0; i < T; ++i){
if(flag[i] == 1)
flag2 = 1;
}
if(flag2){
for(int i = 0; i < T; ++i){
if(flag[i] == 1){
for(int j = 0; j < 18; ++j)
cout << card[i][j];
cout << endl;
}

}
}else
cout << "All passed" <<endl;
}



### 输入样例：

-13142223336


### 输出样例：

81.82%


#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
string num;
double per = 1;
int ans = 0;
int sum = 0;
getline(cin, num);
if(num[0] == '-'){
per *= 1.5;
sum = num.length() - 1;
}else{
sum = num.length();
}
if(num[num.length() - 1] % 2 == 0)
per *= 2;
for(int i = 0; i < num.length(); ++i){
if(num[i] == '2')
ans++;
}
// cout << ans << " " << sum << endl;
double two = (double)ans / sum;
two = two * per * 100;
//cout << per << endl;
printf("%.2lf", two);
cout << "%" <<endl;
}



### 输出格式：

Only hh:mm.  Too early to Dang.


### 输入样例1：

19:05


### 输出样例1：

DangDangDangDangDangDangDangDang


### 输入样例2：

07:05


### 输出样例2：

Only 07:05.  Too early to Dang.
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int hou, min;
scanf("%d:%d", &hou, &min);
if(hou == 0 && min == 0){
printf("Only 00:00.  Too early to Dang.");
}else if(hou == 0 && min < 10){
printf("Only 00:0%d.  Too early to Dang.",min);
}else if(hou == 0 && min >= 10){
printf("Only 00:%d.  Too early to Dang.",min);
}else if(hou > 0 && hou <= 9 && min < 10){
printf("Only 0%d:0%d.  Too early to Dang.",hou, min);
}else if(hou > 0 && hou <= 9 && min >= 10){
printf("Only 0%d:%d.  Too early to Dang.",hou, min);
}else if(hou > 9 && hou < 12 && min < 10){
printf("Only %d:0%d.  Too early to Dang.",hou, min);
}else if(hou > 9 && hou < 12 && min >= 10){
printf("Only %d:%d.  Too early to Dang.",hou, min);
}else if(hou == 12 && min == 0){
printf("Only 12:00.  Too early to Dang.");
}else{
if(min > 0){
for(int i = 0; i <= hou - 12; ++i){
cout <<"Dang";
}
cout <<endl;
}else{
for(int i = 0; i <= hou - 1 - 12; ++i){
cout <<"Dang";
}
cout << endl;
}
}
}



### 输入格式：

甲喊 甲划 乙喊 乙划


### 输入样例：

1 1
6
8 10 9 12
5 10 5 10
3 8 5 12
12 18 1 13
4 16 12 15
15 1 1 16


### 输出样例：

A
1
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int cap_1 = 0, cap_2 = 0;
cin >> cap_1 >> cap_2;
int T;
int dir_1 = 0, dir_2 = 0;
cin >> T;
int say_1[MAX], say_2[MAX], drink_1[MAX], drink_2[MAX];
memset(say_1, 0, sizeof(say_1));
memset(say_2, 0, sizeof(say_2));
memset(drink_1, 0, sizeof(drink_1));
memset(drink_2, 0, sizeof(drink_2));
for(int i = 0; i < T; ++i){
cin >> say_1[i] >> drink_1[i] >> say_2[i] >> drink_2[i];
}
for(int i = 0; i < T; ++i){
if(cap_1 < 0 || cap_2 < 0)
break;
if(say_1[i] + say_2[i] == drink_1[i] && say_1[i] + say_2[i] == drink_2[i])
continue;
if(say_1[i] + say_2[i] != drink_1[i] && say_1[i] + say_2[i] != drink_2[i])
continue;
if(say_1[i] + say_2[i] == drink_1[i] && say_1[i] + say_2[i] != drink_2[i]){
cap_1--;
dir_1++;
}
if(say_1[i] + say_2[i] != drink_1[i] && say_1[i] + say_2[i] == drink_2[i]){
cap_2--;
dir_2++;
}
}
if(cap_1 < 0){
cout << "A" << endl;
cout << dir_2 <<endl;
}
else{
cout << "B" << endl;
cout << dir_1 <<endl;
}
}



### 输入样例1：

3
3 11111 22222 55555
2 33333 44444
4 55555 66666 99999 77777
8
55555 44444 10000 88888 22222 11111 23333 88888


### 输出样例1：

10000 88888 23333


### 输入样例2：

3
3 11111 22222 55555
2 33333 44444
4 55555 66666 99999 77777
4
55555 44444 22222 11111


### 输出样例2：

No one is handsome
#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<math.h>
#include<iostream>
#define MAX 1000005
using namespace std;
int visit[MAX];
int main(int argc, char const *argv[])
{
int n, m, k, id;
cin >> n;
memset(visit, 0, sizeof(visit));
for(int i = 0; i < n; ++i){
scanf("%d", &k);
for(int j = 0; j < k; ++j){
scanf("%d", &id);
if(k == 1)
break;
visit[id] = 1;
}
}
cin >> m;
int pre_id, flag = 0;
for(int i = 0; i < m; ++i){
cin >> pre_id;
if(!visit[pre_id]){
if(++flag > 1)
printf(" ");
printf("%05d", pre_id);
visit[pre_id] = 1;
}
}
if(flag == 0)
cout << "No one is handsome" << endl;
}

### 输入样例：

无


### 输出样例：

I'm gonna WIN!
I'm gonna WIN!
I'm gonna WIN!

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
cout << "I'm gonna WIN!" <<endl;
cout << "I'm gonna WIN!" <<endl;
cout << "I'm gonna WIN!" <<endl;
}



### 输入样例：

9
88 74 101 26 15 0 34 22 77


### 输出样例：

3 6
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int T;
cin >> T;
int num[MAX];
for(int i = 0; i < T; ++i){
cin >> num[i];
}
int odd = 0, ou = 0;
for(int i = 0; i < T; ++i){
if(num[i]%2)
odd++;
else
ou++;
}
cout << odd << " " << ou << endl;
}



### 输入样例：

pcTclnGloRgLrtLhgljkLhGFauPewSKgt


### 输出样例：

GPLTGPLTGLTGLGLL
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
string sen;
getline(cin, sen);
int g = 0, p = 0, l = 0, t = 0;
for(int i = 0; i < sen.length(); ++i){
if(sen[i] == 'g' || sen[i] == 'G')
g++;
else if(sen[i] == 'p' || sen[i] == 'P')
p++;
else if(sen[i] == 'l' || sen[i] == 'L')
l++;
else if(sen[i] == 't' || sen[i] == 'T')
t++;
}
while(g != 0 || p != 0 || l != 0 || t != 0){
if(g != 0){
cout << 'G';
g--;
}
if(p != 0){
cout << 'P';
p--;
}
if(l != 0){
cout << 'L';
l--;
}
if(t != 0){
cout << 'T';
t--;
}
}
}



### 输入样例：

3


### 输出样例：

5

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int day;
cin >> day;
if(day == 6)
cout << 1 << endl;
else if(day == 7)
cout << 2 << endl;
else
cout << day + 2 << endl;
}



### 输出格式：

#include<iostream>
#include<string>
using namespace std;
int main()
{
string S;
int flagA = 0, flagB = 0;
getline(cin,S);//使用getline来接收包括空格在内的字符
int sumA = 0, sumB = 0, Base;
for (int i =0; i <S.length(); i++)
{
if(S[i]==' ')//碰到第一个空格
{
Base = 1;//初始化
for(int j=i-1;j>=0;j--)//计算A，注意j的范围从前一个字符到0
{
if (S[j]<'0' || S[j]>'9')//如果字符不为数字
{
flagA = 1;
break;//标识，退出
}
else
{
sumA += Base*(S[j] - '0');//如果为数字，累加
Base *= 10;
}
if(i==0)//如果第一个字符是空格
{
flagA=1;
break;//标识，退出
}
}
if (sumA>1000||sumA==0)//如果累加和不在0到1000范围内
flagA = 1;
Base = 1;//注意重新初始化
for(int j=S.length()-1;j>i;j--)//计算B，注意j的范围从最后一个字符到i+1
{
if (S[j]<'0' || S[j]>'9')
{
flagB = 1;
break;
}
else
{
sumB += Base*(S[j] - '0');
Base *= 10;
}
}
if (sumB>1000||sumB==0)
flagB = 1;
break;
}
}
if (flagA)
{
if (flagB)
cout << "? + ? = ?";
else
cout << "? + " << sumB << " = ?";
}
else
{
if (!flagB)
cout << sumA << " + " << sumB << " = " << sumA + sumB;
else
cout << sumA << " + ? = ?";
}
return 0;
}


### 输入样例：

无


### 输出样例：

I

L
o
v
e

G
P
L
T

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
cout << "I" << endl;
cout << " " << endl;
cout << "L" << endl;
cout << "o" << endl;
cout << "v" << endl;
cout << "e" << endl;
cout << " " << endl;
cout << "G" << endl;
cout << "P" << endl;
cout << "L" << endl;
cout << "T" << endl;
}



### 输入样例：

18013820100


### 输出样例：

int[] arr = new int[]{8,3,2,1,0};
int[] index = new int[]{3,0,4,3,1,0,2,4,3,4,4};
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
using namespace std;
#define MAX 15
int main(int argc, char const *argv[])
{
string pho;
getline(cin, pho);
int arr[MAX];
int tem[MAX];
memset(arr, 0, sizeof(arr));
for(int i = 0; i < pho.length(); ++i){
arr[pho[i] - '0'] = 1;
}
int num = 0;
for(int i = MAX - 1; i >= 0; --i){
if(arr[i] != 0){
tem[num] = i;
num++;
}
}
cout<< "int[] arr = new int[]{" << tem[0];
for(int i = 1; i < num; ++i){
cout << "," << tem[i];
}
cout << "};" << endl;
cout << "int[] index = new int[]{";
for(int i = 0; i < pho.length(); ++i){
for(int j = 0; j < num; ++j){
if(((pho[i]-'0') == tem[j]) && (i != pho.length() - 1))
cout << j << ",";
else if(((pho[i]-'0') == tem[j]) && (i == pho.length() - 1))
cout << j ;
}
}
cout << "};" << endl;

}



### 输入样例：

2
11
111


### 输出样例：

Yes
No
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 15
int prime(int a){
if(a == 1)
return 1;
for(int i = 1; i < sqrt(a); ++i){
if(a % i == 0 && i != 1){
return 1;
}
}
return 0;
}
int main(int argc, char const *argv[])
{

int T;
unsigned long long a[MAX];
cin >> T;
memset(a, 0, sizeof(a));
for(int i = 0; i < T; ++i){
cin >> a[i];
}
for(int i = 0; i < T; ++i){
int ans = prime(a[i]);

if(ans == 0){
cout << "Yes" << endl;
}
else if(ans == 1){
cout << "No" << endl;
}
}
}



### 输入样例：

169


### 输出样例：

124.2
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 15
int main(int argc, char const *argv[])
{
int high;
cin >> high;
double standard = ((high - 100) * 0.9) * 2;
printf("%.1lf\n", standard);

}



### L1-030 一帮一 （15 分）

“一帮一学习小组”是中小学中常见的学习组织方式，老师把学习成绩靠前的学生跟学习成绩靠后的学生排在一组。本题就请你编写程序帮助老师自动完成这个分配工作，即在得到全班学生的排名后，在当前尚未分组的学生中，将名次最靠前的学生与名次最靠后的异性学生分为一组。

### 输入样例：

8
0 Amy
1 Tom
1 Bill
0 Cindy
0 Maya
1 John
1 Jack
0 Linda


### 输出样例：

Amy Jack
Tom Linda
Bill Maya
Cindy John

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 55
int main(int argc, char const *argv[])
{
int T;
int sex[MAX];
char name[MAX][10];
cin >> T;
memset(sex, 0, sizeof(sex));
memset(name, 0, sizeof(name));
for(int i = 0; i < T; ++i){
scanf("%d %s", &sex[i], &name[i]);
}
int flag[MAX];
memset(flag, 0, sizeof(flag));
for(int i = 0; i < T; ++i){
for(int j = T-1; j >= 0; --j){
if(sex[i] == 0 && sex[j] == 1 && flag[i] != 1 && flag[j] != 1 || sex[i] == 1 && sex[j] == 0 && flag[i] != 1 && flag[j] != 1){
cout << name[i] << " " << name[j] << endl;
flag[i] = 1;
flag[j] = 1;
}
}
}
}



### 输入样例：

3
169 136
150 81
178 155


### 输出样例：

You are wan mei!
You are tai shou le!
You are tai pang le!
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 55
int main(int argc, char const *argv[])
{
int T;
cin >> T;
int high[MAX];
int weigh[MAX];
for(int i = 0; i < T; ++i){
cin >> high[i] >> weigh[i];
}
double standard;
double ans = 0;
for(int i = 0; i < T; ++i){
standard = (double)(((high[i] - 100) * 0.9) * 2);
if(standard < weigh[i]){
double tem_w = (double)weigh[i] - standard;
double tem_s = (double)standard * 0.1;
if(tem_w < tem_s)
cout << "You are wan mei!" << endl;
else
cout << "You are tai pang le!" <<endl;
}
else if(standard > weigh[i]){
double tem_w = (double)standard - weigh[i];
double tem_s = (double)standard * 0.1;
if(tem_w < tem_s)
cout << "You are wan mei!" << endl;
else
cout << "You are tai shou le!" << endl;
}else{
cout << "You are wan mei!" << endl;
}
}
}

### 输入样例1：

15 _
I love GPLT


### 输出样例1：

____I love GPLT


### 输入样例2：

4 *
this is a sample for cut


### 输出样例2：

 cut

#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<string>
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int T;
char ch;
string sen;
scanf("%d %c", &T, &ch);
getchar();
getline(cin, sen);
int len = sen.length();
if(len >= T){
for(int i = len - T; i < len; ++i)
cout << sen[i];
cout << endl;
}
else if(len < T){
for(int i = 0; i < T - sen.length(); ++i)
cout << ch;
for(int i = 0; i < sen.length(); ++i)
cout << sen[i];
cout << endl;
}

return 0;

}


### 输入样例1：

1988 4


### 输出样例1：

25 2013


### 输入样例2：

1 2


### 输出样例2：

0 0001
#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<string>
#include<iostream>
#include<set>
using namespace std;
int find(int year){
set<int> s;
int a, b, c, d;
a = year % 10;
b = year / 10 % 10;
c = year / 100 % 10;
d = year / 1000;
s.insert(a);
s.insert(b);
s.insert(c);
s.insert(d);
return s.size();
}
int main(int argc, char const *argv[])
{
int year, n;
cin >> year >> n;
int count = 0;
while(find(year) != n){
year++;
count++;
}
printf("%d %04d\n", count, year);
}


### 输入样例：

4
3 889 233 2
5 100 3 233 2 73
4 3 73 889 2
2 233 123


### 输出样例：

233 3
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int T;
int bolg[MAX];
memset(bolg, 0, sizeof(bolg));
cin >> T;
while(T--){
int n;
cin >> n;
int tem;
for(int i = 1; i <= n; ++i){
cin >> tem;
bolg[tem]++;
}
}
int ans = 0;
int max = 0;
for(int i = 1; i <= 1000; ++i)
{
if(max <= bolg[i]){
ans = i;
max = bolg[i];
}
}
cout << ans << " " << bolg[ans] << endl;

}

### 输入样例1：

GaoXZh
Magi
Einst
Quark
LaoLao
FatMouse
ZhaShen
fantacy
latesum
SenSen
QuanQuan
whatever
whenever
Potaty
hahaha
.


### 输出样例1：

Magi and Potaty are inviting you to dinner...


### 输入样例2：

LaoLao
FatMouse
whoever
.


### 输出样例2：

FatMouse is the only one for you...


### 输入样例3：

LaoLao
.


### 输出样例3：

Momo... No one is for you ...
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
char list[MAX][15];
int i = 0;
while(1){
cin >> list[i];
if(list[i][0] == '.')
break;
i++;
}
i--;
if(i < 1)
cout << "Momo... No one is for you ..." << endl;
else if(i < 13)
cout << list[1] << " is the only one for you..." << endl;
else
cout << list[1] << " and " << list[13] << " are inviting you to dinner..." << endl;
}

### 输入样例：

-8 13


### 输出样例：

-104
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int a, b;
cin >> a >> b;
cout << a * b << endl;
}

### 输入样例1：

-1 2


### 输出样例1：

-1/2=-0.50


### 输入样例2：

1 -3


### 输出样例2：

1/(-3)=-0.33


### 输入样例3：

5 0


### 输出样例3：

5/0=Error
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
double a, b;
double sum;
cin >> a >> b;
sum = (double)(a / b);
if(b > 0)
printf("%.0lf/%.0lf=%.2lf\n", a, b, sum);
else if (b < 0)
printf("%.0lf/(-%.0lf)=%.2lf\n", a, -b, sum);
else
printf("%.0lf/%.0lf=Error", a, b);
}

### 输入样例：

无


### 输出样例：

Hello World
Hello New World
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
cout << "Hello World" << endl;
cout << "Hello New World" <<endl;
}

### 输入样例：

4
This is a test case


### 输出样例：

asa T
st ih
e tsi
ce s
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int T;
cin >> T;
string ch;
getchar();
getline(cin, ch);
char mp[MAX][MAX];
memset(mp, 0, sizeof(mp));
int num = ch.length();
int row = num / T;
if(num % T != 0)
row ++;
int k = 0;
for(int i = 0; i < T; ++i){
for(int j = 1; j <= row; ++j){
mp[i][j] = ' ';
}
}
for(int i = row ; i >= 0; --i){
for(int j = 0; j < T; ++j){
if(k == num)
break;
mp[j][i] = ch[k];
k++;
}
}
for(int i = 0; i < T; ++i){
for(int j = 1; j <= row; ++j){
cout << mp[i][j];
}
cout << endl;
}

}

### 输入样例：

2
M 1.75
F 1.8


### 输出样例：

1.61
1.96
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int n;
cin >> n;
while(n--){
char ch;
double high;
cin >> ch >> high;
if(ch == 'F')
printf("%.2lf\n", high * 1.09);
else
printf("%.2lf\n",high / 1.09);
}

}

### 输入样例：

888 666 123 -233 250 13 250 -222


### 输出样例：

5
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int n;
int num = 0;
while(cin >> n && n != 250){
num++;
}
cout << num+1 << endl;

}

### 输入样例：

03-15-2017


### 输出样例：

2017-03-15
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int year, month, day;
scanf("%d-%d-%d", &month, &day, &year);
if(day < 10 && month < 10)
printf("%d-0%d-0%d\n", year, month, day);
else if(day >= 10 && month < 10)
printf("%d-0%d-%d\n", year, month, day);
else if(day < 10 && month >= 10)
printf("%d-%d-0%d\n", year, month, day);
else if(day >= 10 && month >= 10)
printf("%d-%d-%d\n", year, month, day);

}

### 输入格式：

书号（[1, 1000]内的整数） 键值SE） 发生时间hh:mm，其中hh是[0,23]内的整数，mm是[0, 59]内整数）

### 输入样例：

3
1 S 08:10
2 S 08:35
1 E 10:00
2 E 13:16
0 S 17:00
0 S 17:00
3 E 08:10
1 S 08:20
2 S 09:00
1 E 09:20
0 E 17:00


### 输出样例：

2 196
0 0
1 60
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(){
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int id = -1;
double time = 0;
int num = 0;
int mintue[2001] = {0};
bool flag[2001];
memset(flag, false, sizeof(flag));
while (id != 0) {
char a;
int h, m;
scanf("%d %c %d:%d", &id, &a, &h, &m);
if (id == 0) {
break;
} else if (a == 'S') {
mintue[id] = h * 60 + m;
flag[id] = true;
} else if (a == 'E') {
if (flag[id]) {
flag[id] = false;
time += h * 60 + m - mintue[id];
mintue[id] = 0;
num++;
}
}
}
int t;
if (num != 0) {
time /= num;
}
t = time + 0.5f;
printf("%d %d\n", num, t);
}
}


### 输入样例：

2
ChuiZi
JianDao
Bu
JianDao
Bu
ChuiZi
ChuiZi
End


### 输出样例：

Bu
ChuiZi
Bu
ChuiZi
JianDao
ChuiZi
Bu
  #include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 10005
int main(int argc, char const *argv[])
{
int T;
cin >> T;
char game[MAX][10];
int i = 0;
while(1){
cin >> game[i];
if(game[i][0] == 'E')
break;
i++;
}
int num = 0;
for(int j = 0; j < i; ++j){
if(game[j][0] == 'C' && num != T){
cout << "Bu" << endl;
num++;
}
else if(game[j][0] == 'B' && num != T){
cout << "JianDao" << endl;
num++;
}
else if(game[j][0] == 'J' && num != T){
cout << "ChuiZi" << endl;
num++;
}
else if(num == T){
cout << game[j] << endl;
num = 0;
}
}

}

### 输入样例：

Mars


### 输出样例：

Hello Mars
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
string plant;
getline(cin, plant);
cout << "Hello ";
for(int i = 0; i < plant.length(); ++i){
cout << plant[i];
}
cout << endl;
}

### 输入样例：

31


### 输出样例：

3584229390681 15
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(){
int i,j,k,n,m;
long long f1,f2,f3;
cin >> f1;
n=0;
for(f2=1;f2<f1;f2=f2*10+1)
n++;
while(1){
n++;
if(f2%f1==0){
cout << f2/f1;
break;
}else{
cout << f2/f1;
f2%=f1;
f2=f2*10+1;
}
}
cout << " " << n<<endl;
return 0;
}


### 输入样例：

4
Amy 15 70
Tom 14 60
Joe 18 50
Zoe 21 71

### 输出样例：

Tom
Zoe


#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 1005
int main(int argc, char const *argv[])
{
int T;
cin >> T;
char name[MAX][5];
int breath[MAX];
int pulse[MAX];
for(int i = 0; i < T; ++i){
scanf("%s %d %d", &name[i], &breath[i], &pulse[i]);
}
for(int i = 0; i < T; ++i){
if(breath[i] < 15 || breath[i] > 20 || pulse[i] < 50 || pulse[i] > 70)
cout << name[i] << endl;
}

}

### 输入样例1：

2 3
1 2 3
4 5 6
3 4
7 8 9 0
-1 -2 -3 -4
5 6 7 8


### 输出样例1：

2 4
20 22 24 16
53 58 63 28


### 输入样例2：

3 2
38 26
43 -5
0 17
3 2
-11 57
99 68
81 72


### 输出样例2：

Error: 2 != 3

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 105
int main(int argc, char const *argv[])
{
int A[MAX][MAX];
int B[MAX][MAX];
int ans[MAX][MAX];
memset(A, 0, sizeof(A));
memset(B, 0, sizeof(B));
memset(ans, 0, sizeof(ans));
int a_line, a_row, b_line, b_row;
cin >> a_line >> a_row;
for(int i = 1; i <= a_line; ++i){
for(int j = 1; j <= a_row; ++j){
cin >> A[i][j];
}
}
cin >> b_line >> b_row;
for(int i = 1; i <= b_line; ++i){
for(int j = 1; j <= b_row; ++j){
cin >> B[i][j];
}
}
if(a_row != b_line){
printf("Error: %d != %d\n", a_row, b_line);
}
else{
for(int i = 1; i <= a_line; ++i){
for(int j = 1; j <= b_row; ++j){
for(int k = 1; k <= a_row; ++k){
ans[i][j] += A[i][k] * B[k][j];
}
}
}
cout << a_line << " " << b_row << endl;
for(int i = 1; i <= a_line; ++i){
for(int j = 1; j <= b_row; ++j){
if(j != b_row)
cout << ans[i][j] << " ";
else
cout << ans[i][j];
}
cout << endl;
}
}

}

### 输入样例：

3
3 4 2


### 输出样例：

#1
1 4 7 10 13 16 19 22 25 28
31 34 37 40 43 46 49 52 55 58
61 63 65 67 69 71 73 75 77 79
#2
2 5 8 11 14 17 20 23 26 29
32 35 38 41 44 47 50 53 56 59
62 64 66 68 70 72 74 76 78 80
82 84 86 88 90 92 94 96 98 100
#3
3 6 9 12 15 18 21 24 27 30
33 36 39 42 45 48 51 54 57 60
#include<stdio.h>
#include<iostream>
#include<string.h>
#include<algorithm>
#include<math.h>
#include<vector>
using namespace std;
int m[105];
int f[105];///用于判断每队是否都已编号完毕
int main()
{
int n, len = 0,sum = 0,len1 = 0;
vector<int>A[105];
cin>>n;
for(int i = 0;i < n; i++)
{
cin >> m[i];
m[i] = m[i]*10;///每队的人数
sum += m[i];
}
memset(f,0,sizeof(f));
for(int i = 1;;)
{
int t = 0;
while(t < n)
{
if(A[t].size() < m[t])
{
len1++;
A[t].push_back(i);
if(len + 1 ==n)///如果只剩下一个队，编号要依次加2
i += 2;
else
i += 1;
}
if(f[t] == 0 && A[t].size() >= m[t])
{
f[t] = 1;
len++;
}
t++;
}
if(len1 == sum)
break;
}
for(int i = 0;i < n; i++)
{
printf("#%d\n",i + 1);
for(int j = 0; j < A[i].size(); j++)
{
if(j % 10 != 0)
cout << " ";
cout << A[i][j];
if(j % 10 == 9)
cout << endl;
}
if(A[i].size() % 10 != 0)
cout << endl;
}
return 0;
}


### 输入样例：

3 7417


### 输出样例：

pat
#include<stdio.h>
#include<algorithm>
#include<memory.h>
#include<string>
#include<iostream>
#include<set>
using namespace std;
int main(){
int L, N, c;
char s[7];
memset(s, 0, sizeof(s));
cin >> L >> N;
c = L - 1;
s[L] = '\0';
N--;
while(N || c >= 0)
{
s[c --] = 'z' - N % 26;
N /= 26;
}
cout << s;
}


### 输入样例：

988 7


### 输出样例：

691.60
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 100005
int main(int argc, char const *argv[])
{
int price;
double discount;
cin >> price >> discount;
printf("%.2lf\n", price * discount * 0.1);
}

### L1-052 2018我们要赢 （5 分）

2018年天梯赛的注册邀请码是“2018wmyy”，意思就是“2018我们要赢”。本题就请你用汉语拼音输出这句话。

### 输入样例：

无


### 输出样例：

2018
wo3 men2 yao4 ying2 !
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 100005
int main(int argc, char const *argv[])
{
cout << "2018" << endl;
cout << "wo3 men2 yao4 ying2 !" << endl;
}

### 输入样例：

2 1


### 输出样例：

Wang!Wang!Wang!
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 100005
int main(int argc, char const *argv[])
{
int a, b;
cin >> a >> b;
int ans = a + b;
for(int i = 0; i < ans; ++i){
printf("Wang!");
}
cout << endl;
}

### L1-054 福到了 （15 分）

“福”字倒着贴，寓意“福到”。不论到底算不算民俗，本题且请你编写程序，把各种汉字倒过来输出。这里要处理的每个汉字是由一个 N × N 的网格组成的，网格中的元素或者为字符 @ 或者为空格。而倒过来的汉字所用的字符由裁判指定。

$9 @ @@@@@ @@@ @@@ @ @ @ @@@ @@@ @@@ @@@@@ @@@ @ @ @ @@@ @@@@@ @ @ @ @ @ @@@@@  ### 输出样例 1： $     $$ $$ $$  


### 输入样例 2：

& 3
@@@
@
@@@


### 输出样例 2：

bu yong dao le
&&&
&
&&&

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 105
int main(int argc, char const *argv[])
{
char ch;
char mp[MAX][MAX], mp_t[MAX][MAX];
memset(mp, 0, sizeof(mp));
memset(mp_t, 0, sizeof(mp_t));
int N;
scanf("%c %d", &ch, &N);
getchar();
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
scanf("%c", &mp[i][j]);
}
getchar();
}
for(int i = N-1, k = 0; i >= 0; --i, ++k){
for(int j = N-1, m = 0; j >= 0; --j, ++m){
mp_t[k][m] = mp[i][j];
}
}
int flag = 0;
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
if(mp[i][j] != mp_t[i][j])
{
flag = 1;
break;
}
}
}
if(flag == 1){
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
if(mp_t[i][j] != ' ')
mp_t[i][j] = ch;
}
}
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
cout << mp_t[i][j];
}
cout << endl;
}
}
else{
cout << "bu yong dao le" << endl;
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
if(mp_t[i][j] != ' ')
mp_t[i][j] = ch;
}
}
for(int i = 0; i < N; ++i){
for(int j = 0; j < N ; ++j){
cout << mp_t[i][j];
}
cout << endl;
}
}
}

### 输出格式：

The winner is x: P1 + P2


### 输入样例：

327 129
1 0 1


### 输出样例：

The winner is a: 327 + 1

#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 105
int main(int argc, char const *argv[])
{
int pic_1, pic_2;
cin >> pic_1 >> pic_2;
int re[MAX];
for(int i = 0; i < 3; ++i){
cin >> re[i];
}
int a = 0, b = 0;
for(int i = 0; i < 3; ++i){
if(re[i] == 0)
a++;
else if(re[i] == 1)
b++;
}
if(pic_1 > pic_2 && a != 0)
cout << "The winner is a: " << pic_1 << " + " << a << endl;
else if (pic_1 < pic_2 && a == 3)
cout << "The winner is a: " << pic_1 << " + " << a << endl;
else if(pic_1 < pic_2 && b != 0)
cout << "The winner is b: " << pic_2 << " + " << b << endl;
else if (pic_1 > pic_2 && b == 3)
cout << "The winner is b: " << pic_2 << " + " << b << endl;

}

### 输入样例：

7
Bob 35
Amy 28
James 98
Alice 11
Jack 45
Smith 33
Chris 62


### 输出样例：

22 Amy
#include<stdio.h>
#include<string>
#include<memory.h>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX 10005
int abs(int a, int b){
if(a - b < 0)
return b - a;
else
return a - b;
}
int main(int argc, char const *argv[])
{
char name[MAX][10];
int num[MAX];
memset(name, 0, sizeof(name));
memset(num, 0, sizeof(num));
int T;
cin >> T;
for(int i = 0; i < T; ++i){
scanf("%s %d", &name[i], &num[i]);
}
double sum = 0;
for(int i = 0; i < T; ++i){
sum += num[i];
}
int avg;
avg = sum / T / 2;
for(int i = 0; i < T; ++i){
num[i] = abs(num[i],avg);
}
int max = 101;
int flag = 0;
for(int i = 0; i < T; ++i){
if(num[i] < max)
{
max = num[i];
flag = i;
}
}
cout << avg << " " << name[flag];

}

• 6
点赞
• 0
评论
• 26
收藏
• 一键三连
• 扫一扫，分享海报

02-12 4251
10-25 537

11-27 470
12-11 237
04-03 1469
03-17 5889
02-18 882
03-08 372
01-12 677
03-11 1000
01-11 166
03-31 55
04-22 773