
PAT甲级题解
Linuxsen
这个作者很懒,什么都没留下…
展开
-
1002 A+B for Polynomials (25分) 详解+易错点
注意点:系数为0,则不输出,例:其中-1和1相加为0,则在输出时避免这一项,而且要注意结果的K值,不要包括这一项,思路,利用结构体存储系数和指数,然后利用两个数组分别存储两个输入,循环查找指数相同项,把它们的系数相加,然后判断是否为0,如果不为0则放入结果数组中,然后将它们的系数设为一个特殊的值(就是随便想的一个值),最后,再进行一次循环判断该项的系数是否为特殊值,不为特殊值则放入结果...原创 2020-03-21 12:50:53 · 855 阅读 · 0 评论 -
1001 A+B Format (20分) 题解,易错点分析
Calculatea+band output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...原创 2020-03-21 01:06:17 · 659 阅读 · 0 评论