上一页 1 2 3 4 5 6 7 8 9 ··· 25 下一页
摘要: Description 问题:输入n,输出正倒n层星号三角形。首行顶格,星号间有一空格,效果见样例 输入样例: 3 输出样例: * * * * * * * * * * * 数据规模 1<= n <=50 idea 三角形不是空心的,也不是完全实心正负对角线围起来的区域,奇数行的奇数列 或 偶数行的偶 阅读全文
posted @ 2022-01-07 11:20 Moliay 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Description 请输入高度h,输入一个高为h,上底边长为h 的等腰梯形(例如h=4,图形如下)。 **** ****** ******** ********** Input 输入第一行表示样例数m,接下来m行每行一个整数h,h不超过10。 Output 对应于m个case输出要求的等腰梯形。 阅读全文
posted @ 2022-01-07 11:20 Moliay 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Description 输入一个高度h,输出一个高为h,上底边为h的梯形。 Input 一个整数h(1<=h<=1000)。 Output h所对应的梯形。 Sample Input Copy 5 Sample Output Copy ***** ******* ********* ******** 阅读全文
posted @ 2022-01-07 11:20 Moliay 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, “helloworld” can be printed as: h d e l 阅读全文
posted @ 2022-01-07 11:19 Moliay 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 ***** *** * *** ***** 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号, 阅读全文
posted @ 2022-01-06 19:16 Moliay 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧! 输入格式: 输入在一行中给出正方形边长N(3<=N<=20)和组成正方 阅读全文
posted @ 2022-01-06 17:52 Moliay 阅读(22) 评论(0) 推荐(0) 编辑
摘要: This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2022-01-06 16:49 Moliay 阅读(13) 评论(0) 推荐(0) 编辑
摘要: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2022-01-06 16:19 Moliay 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 呜呜希望在一月能实现读懂甲级题目,拿啥拯救你my poor English≡(▔﹏▔)≡ With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as 阅读全文
posted @ 2022-01-06 15:37 Moliay 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 为了用事实说明挖掘机技术到底哪家强,PAT 组织了一场挖掘机技能大赛。现请你根据比赛结果统计出技术最强的那个学校。 输入格式: 输入在第 1 行给出不超过 10 5 的正整数 N,即参赛人数。随后 N 行,每行给出一位参赛者的信息和成绩,包括其所代表的学校的编号(从 1 开始连续编号)、及其比赛成绩 阅读全文
posted @ 2022-01-06 14:36 Moliay 阅读(11) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 25 下一页