题解列表

筛选

去掉余数为2的数即可

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

自定义函数之数字分离

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

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;……

3019: 约瑟夫问题 python自带库实现

摘要:解题思路:使用python自带库,collections中的deque,队列实现retate(n)是将队列中的所有元素向右移动n位,如果是负数,则向左移动例如:dq = [1, 2, 3, 4, 5]……

编写题解 2828: 与7无关的数

摘要:解题思路:注意事项:参考代码:n=int(input())sum=0for i in range(1,n+1):    if i%7!=0 and i%10!=7 and i//10!=7:     ……

编写题解 2829: 数1的个数

摘要:解题思路:注意事项:参考代码:n=int(input())times=0for i in range (1,n+1):    times+=str(i).count(&#39;1&#39;)print……

编写题解 2830: 数字统计

摘要:解题思路:注意事项:参考代码:l,r=map(int,input().split())times=0for i in range (l,r+1):    times+=str(i).count(&#3……

编写题解 2831: 画矩形

摘要:解题思路:注意事项:参考代码:h,w,c,flag=map(str,input().split())h=int(h)w=int(w)flag=int(flag)if flag==1:    for i……