题解列表

筛选

恺撒密码-模拟

摘要:解题思路:模拟注意事项:参考代码:#include<iostream>usingnamespacestd;intmain(){ stri……

C++:类和访问权限

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std ;class sum{……

c语言好数详解

摘要:解题思路:第一位是奇数位,第二位是偶数位,第三位是奇数位....注意事项:参考代码:#include <stdio.h>int main(){ int n; int i,a; scanf(……

换位置-双向逆序

摘要:解题思路:如果n个人如果是线性排列,要使123456…n变成n…654321, 那么需要的时间总数就是(n-1)+…+5+4+3+2+1=n*(n-1)/2;即1右移n-1步, 2右移n-2步…再回到……

排列:DFS全排列

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;constintN&……

2955 判断素数个数

摘要:解题思路: 先判断是否为素数pd_sushu然后统计个数count_sushu,调用注意事项:参考代码:def pd_sushu(n):#判断是否为素数 if n……