题解列表

筛选

1681: 数据结构-行编辑程序(c++)

摘要:解题思路:此题的关键就是getline函数,string 类中的方法,不然后续的空格无法输出,或者答案错误注意事项:参考代码:#include #include using namespace s……

分糖果题解

摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int n = sc.nextInt(),count = 0; //人数,计数器 int[]……

循环练习之完美数判断(简单C++)

摘要:解题思路:建议在外面写个函数进行因子求和,看的更加清晰注意事项:参考代码:#include<iostream> using namespace std; int f(int n) {     ……

罗列完美数(简单C++函数法)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int f(int n) {     int s=0,i;     for(i=……

星期判断机(C++switch)

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