数制转换题解
#include<cstdio> #include<cstring> #include<cctype> #define len 1000000 using namespace std; int a[5…
#include<cstdio> #include<cstring> #include<cctype> #define len 1000000 using namespace std; int a[5…
前两次的出错是因为,没有考虑到找不到字符的情况。最后解决了这种情况就通过了。下面简单分析一下代码:变量的定义就不说了,因为这个看懂题目之后就能得出。下面说一下string.erase()函数和string.find_first_of()…
简直不要太难受,一直忘记考虑乘数是10的整备数的情况,导致后面发生一些曲折的问题。还有就是题目中的100以内,应该是不包括100的。#include<cstdio> using namespace std; int main…
注意搞清楚题目要求的值是那几个,和已知条件。直接采用枚举的方法就能解题,所谓枚举可以简单的理解为一一例举。#include<iostream> using namespace std; int main(){ int a,b…