2017年1月9日

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, a 阅读全文

posted @ 2017-01-09 14:28 于无声出听惊雷 阅读(90) 评论(0) 推荐(0) 编辑

1001. A+B Format (20)

摘要: 题意:两个数求和,对于和从后往前每3个数输出一个",",直到剩余的数小于4. 解题思路:用字符串模拟整数进行操作。 用到C++ string中的insert函数在指定位置插入一个字符 insert有2个参数:第一个为迭代器的位置 第二个为要在该位置插入的字符。 和分情况讨论: 1. 为0 直接输出0 阅读全文

posted @ 2017-01-09 00:52 于无声出听惊雷 阅读(106) 评论(0) 推荐(0) 编辑

导航