题解列表

筛选

C语言新手-写的有点乱

摘要:参考代码:#include<stdio.h>int fun(int a[],int N,int sum){    int b[N],c[N],flag = 1;    for(int z=0;z<N;……

自定义函数之数字分离

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n = 0; int qian = 1000; int hou = 1000; scanf_s("%d……

高效素数判断方法以及取模公式

摘要:解题思路:本体采用的取模公式为a*b%c=((a%c)*(b%c))%c,求前n个质数的积对于50000的模,就相当于每一次与质数相乘后对于50000取模,然后再与下一个质数相乘,再取模,相乘取模的步……

去掉余数为2的数即可

摘要:关键在于,如何判断某个数是不是平方差 ```c++ #include using namespace std; bool function(int x) { bool res =……

找规律找规律

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,m; cin >> n >> m; int a[……

3009: 判断闰年

摘要:解题思路:闰年两种判定方法:要么能被4整除且不能被100整除,或者能被400整除可得参考代码:#include<iostream> using namespace std; int main()……