题解列表

筛选

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('1')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……

2046:输出全排列

摘要:解题思路:注意事项:printf代替cout可避免超时参考代码:#include<iostream>using namespace std;const int N=10;int num[N];bool……

最Easy的一集

摘要:这怎么好意思放在中等题???? ``` import java.util.Scanner; public class Main { public static void mai……

2798: 整数序列的元素最大跨度值

摘要:注意事项:    给max和min赋值时注意,一定要让这两个值有改动,否则记录的不是输入的值,max够小,min够大参考代码:#include<iostream> using namespace s……

编写题解 2832: 第n小的质数

摘要:解题思路:注意事项:参考代码:from math import sqrtimport mathn=int(input())c=[2]num=1while num<=n:    for i in ran……