题解列表

筛选

Manchester-【平方和与立方和-题解(C语言代码)】

####解题思路:输入整数m和n。设x为m到n所有偶数的平方和,y为m到n所有奇数的立方和。遍历m到n的每一个数i,若i是偶数,则求平方后加入x,若i是奇数则求立方后加入y。最后按格式输出x和y。####参考代码:```c#includeintmain(){intm,

成绩排序-题解(C++代码)sort()

c++重写sort()中的比较函数```cpp#include#include#includeusingnamespacestd;structstudent{charname[101];intage;intgrade;}s[1000];boolcmp(structstudenta,