首页 > TAG信息列表 > A1002
[PAT] A1002 A+B for Polynomials (23分!)
A1002 A+B for Polynomials Input SpecificationOutput SpecificationSample InputSample OutputCode 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 occupiesPAT-A1002 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: K N1 aN1 N2 aNA1002. A+B for Polynomials
题目描述 This time, you are supposed to find A+B where A and B are two polynomials 输入格式 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 aN2 ... NK aNK , wherePAT A1002 A+B for Polynomials(25)
AC代码 转载自https://www.cnblogs.com/zjutJY/p/9413766.html #include <stdio.h> #include<string.h> //输入:两行数据,每行表示一个多项式:第一个数字表示非零项的数目, //后面每两个数表示一项,分别表示幂次和系数。 //输出:两个多项式的和,格式与输入一样 int main(){ const inA1002 字符串长度
在右侧我们给出了一个已经基本完成的程序,读入了一个字符串,调用了一个叫str_len的函数来计算这个字符串的长度,并输出。 聪明的你应该已经发现了,这个叫str_len的函数并没有完成,在不修改函数原型的情况下,请完成str_len函数,实现我们上述的功能吧。 样例输入复制 abcdefg 样例输出