浙大PAT-1002】的更多相关文章

pat链接:http://pat.zju.edu.cn 1 #include<stdio.h> 2 int main(){ 3 int a,b; 4 int c; 5 while(scanf("%d %d",&a,&b)!=EOF){ 6 c=a+b; 7 if(c<0){ 8 c=-c; 9 printf("-"); 10 } 11 if(c>=1000000) 12 printf("%d,%03d,%03d\n&…
1001. 害死人不偿命的(3n+1)猜想 1002. 写出这个数 1003. 我要通过! 1004. 成绩排名 1005. 继续(3n+1)猜想 1006. 换个格式输出整数 1007. 素数对猜想 1008. 数组元素循环右移问题 1009. 说反话 1010. 一元多项式求导 1011. A+B和C 1012. 数字分类 1013. 数素数 1014. 福尔摩斯的约会 1015. 德才论 1016. 部分A+B 1017. A除以B 1018. 锤子剪刀布 1019. 数字黑洞 1020.…
1002. A+B for Polynomials (25) This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N1 aN1 N2 aN…
1035. Password (20) 时间限制 400 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is…
1025. PAT Ranking (25) 时间限制 200 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneous…
1002. A+B for Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, an…
1002 写出这个数 (20)(20 分) 读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值.这里保证n小于10^100^. 输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格. 输入样例: 1234567890987654321123456789 输出样例: yi san wu #include<iostream> #include<string>…
1002 A+B for Polynomials (25 分) This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial…
读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值.这里保证n小于10100. 输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格. 输入样例: 1234567890987654321123456789 输出样例: yi san wu #include<stdio.h> #include<string.h> int main(){ ]; scanf(&…
1021: #include<stdio.h> #include<string.h> #include<vector> #include<queue> using namespace std; #define N 10005 vector<int> v[N]; queue<int> q; int tree[N],h[N],dis[N],vis[N]; int n,maxh; int findroot(int x){ ) return…