摘要:提交代码: 1 #include <stdio.h> 2 3 int main(){ 4 int row,col; //定义行数和列数 5 char c; 6 scanf("%d %c",&col,&c);//输入列数 欲使用的字符 7 //计算行数 8 if(col%2==1) row=col/2
阅读全文
随笔分类 - PAT
摘要:提交代码: 1 #include <stdio.h> 2 3 int main(){ 4 int row,col; //定义行数和列数 5 char c; 6 scanf("%d %c",&col,&c);//输入列数 欲使用的字符 7 //计算行数 8 if(col%2==1) row=col/2
阅读全文
摘要:提交代码: 1 #include <stdio.h> 2 3 //定义常量 宏定义(宏替换) 4 #define maxn 100010 5 6 int school[maxn]={0}; 7 8 int main(){ 9 10 int n,schID,score; 11 scanf("%d",&
阅读全文
摘要:卡拉兹(Callatz)猜想 对任何一个自然数n,如果它是偶数,那么将他砍掉一半;如果它是奇数,那么把(3*n+1)砍掉一半。这样一直反复砍下去,最后一顶在某一步得到n=1。 卡拉兹在1950年的世界数学家大会上公布了这个猜想。 此处非要证明卡拉兹猜想,而是对给定的任何一个不超过1000的正整数n简
阅读全文
摘要:1002 A+B for Polynomials This time, you are supposed to find A+B are two polynomials. Input Specification: Each input file contains one test case.Each
阅读全文
摘要:1001 A+BFromat Calculate a+b and output the sum in standard format -- that is,the diits must be seperated into groups of three commas (unless there ar
阅读全文
摘要:题目: 1002. 写出这个数 (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 800
阅读全文
摘要:1001题目: 1001. 害死人不偿命的(3n+1)猜想 (15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536
阅读全文
|