![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PTA
Young *
这个作者很懒,什么都没留下…
展开
-
7-64 最长对称子串——PTA
题目:对给定的字符串,本题要求你输出最长对称子串的长度。例如,给定Is PAT&TAP symmetric?,最长对称子串为s PAT&TAP s,于是你应该输出11。输入格式:输入在一行中给出长度不超过1000的非空字符串。输出格式:在一行中输出最长对称子串的长度。输入样例:Is PAT&TAP symmetric?输出样例:11...原创 2020-01-14 16:27:37 · 424 阅读 · 0 评论 -
7-56 找鞍点——PTA
7-56找鞍点一个矩阵元素的“鞍点”是指该位置上的元素值在该行上最大、在该列上最小。本题要求编写程序,求一个给定的n阶方阵的鞍点。输入格式:输入第一行给出一个正整数n(1≤n≤6)。随后n行,每行给出n个整数,其间以空格分隔。输出格式:输出在一行中按照“行下标 列下标”(下标从0开始)的格式输出鞍点的位置。如果鞍点不存在,则输出“NONE”。题目保证给出的矩阵至多存在一个...原创 2020-01-13 15:39:21 · 394 阅读 · 0 评论 -
7-49 Have Fun with Numbers——PTA(含翻译)
题目:Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit numbe...原创 2020-01-10 11:39:26 · 1753 阅读 · 0 评论 -
7-24 猜数字游戏——PTA
代码参考:#include <stdio.h>#include <stdlib.h>void judge(int s);int main(){ int x,y,N,cnt=0; scanf("%d %d",&y,&N); while(N!=cnt) { scanf("%d",&x); if(y==x&&...原创 2020-01-02 17:17:21 · 425 阅读 · 0 评论