当前位置:网站首页>PTA year of birth
PTA year of birth
2022-07-01 18:17:00 【weCream】

answer :
#include<stdio.h>
int main()
{
int n,i;
char q;
scanf("%c %d",&q,&n);
getchar();
char gird[n][n];
for(i=0;i<n;i++){
gets(gird[i]);
}
int same=1,j;
// Judge whether to fall
for(i=n-1;i>=0;i--){
for(j=n-1;j>=0;j--){
if(gird[n-1-i][n-1-j]!=gird[i][j]){
same=0;
break;
}
}
}
if(same==1){
printf("bu yong dao le ");
}
int cnt=0;
for(i=n-1;i>=0;i--){
for(j=n-1;j>=0;j--){
// If it is not a space, replace the character
if(gird[i][j]!=' '){
gird[i][j]=q;
}
printf("%c",gird[i][j]);
cnt++;
if(cnt==n){
cnt=0;
printf(" ");
}
}
}
return 0;
}
Limited ability , The code is not concise enough , I hope the boss will criticize and correct me .
边栏推荐
- Zabbix报警执行远程命令
- Replace UUID, nanoid is faster and safer!
- Redis master-slave realizes 10 second check and recovery
- D @ safety and dip1000
- Domestic spot silver should be understood
- Sword finger offer II 105 Maximum area of the island
- Mujoco's biped robot Darwin model
- People help ant help task platform repair source code
- Session layer of csframework, server and client (1)
- Gameframework eating guide
猜你喜欢

Work and leisure suggestions of old programmers

. Net cloud native architect training camp (permission system code implements actionaccess) -- learning notes

An example of data analysis of an old swatch and an old hard disk disassembly and assembly combined with the sensor of an electromagnetic press

New patent applications and transfers

How to use JMeter function and mockjs function in metersphere interface test

New 95 community system whole station source code

Common design parameters of solid rocket motor

Definition of rotation axis in mujoco

t10_ Adapting to Market Participantsand Conditions

Review Net 20th anniversary development and 51aspx growth
随机推荐
ACL 2022 | decomposed meta learning small sample named entity recognition
The method of real-time tracking the current price of London Silver
Android development interview was badly hit in 3 years, and now the recruitment technical requirements are so high?
MES production equipment manufacturing execution system software
Cassette helicopter and alternating electric field magnetic manometer DPC
Classpath classpath
Nearly 60% of the employees strongly support Ctrip's "3+2" working mode, and work at home for two days a week
February 16, 2022 Daily: graph neural network self training method under distribution and migration
网上股票开户安全吗?是否可靠?
Yuancosmos game farmersworld farmers world - core content of the second conference in China!
Reflective XSS vulnerability
Wechat applet blind box - docking wechat payment
Leetcode problem solving series -- continuous positive sequence with sum as s (sliding window)
PHP implements sensitive word filtering system "suggestions collection"
PIP version problems: PIP problems still occur when installing akshare and using Tsinghua source and Douban source
When the fixed frequency artifact falls in love with multithreading | ros2 fixed frequency topic release demo
Penetration practice vulnhub range Tornado
Kernel stray cat stray dog pet adoption platform H5 source code
t10_ Adapting to Market Participantsand Conditions
Function, condition, regular expression