题解列表

筛选

先这样再那样

摘要:```c #include int gcd(int m,int n){ return (m%n==0)?n:gcd(n,m%n); } int lcm(int m,int n){ ……

1029-自定义函数处理素数

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;bool isPrime(int n){ bool flag=t……

另一种思路来解决数字后移

摘要:解题思路:通过将数组复制到此数组后,打印对应位来解决注意事项:注意打印循环i的起始值,否则会写成数字前移。参考代码:#include <stdio.h>int main(){    int x, n;……