题解列表

筛选

字符串链接 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream> #include <string> using namespace std; int main(){ string s,……

2+22+222+2222+22222

摘要:解题思路:我写了个函数进行计算各项和求和,因为2 22 222,后面一项是前面一项*10+2,我定义了一个足够大的数组a[1000],函数传入多少项,返回计算好的结果。注意事项:没有过多的注意事项,只……

P1019 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main() { int n; scanf("%d", &n); int a[n], b[n……

程序员的表白 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int fun(int n){     int d=n;     while(d)     ……