题解列表

筛选

组合的输出(python)

摘要:解题思路:注意事项:参考代码:def combine(n, k):    def backtrack(combination, start, n, k, res):        if k == 0:……

2864: 单词替换

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;class Main {    public static void main(String[] args) {    ……

我的很简洁

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() {    int max = -0x7fffffff; // 初始化最大值为负无穷    int num;   ……

合法C标识符

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;class Main {    public static void main(String[] args) {    ……

递归求解java

解题思路:编写递归函数,在主函数中调用这个函数以便求得第n位与第n+1位的结果,将结果相除就ok啦注意事项:double与float的区别,java中float数据在第8位进行四舍五入,因此要用double,注意递归的时间限制参考代码:importjava.util.Scanner;publiccla

2822: 求分数序列和

摘要:解题思路:注意事项:参考代码:#include#includeusing namespace std; double molecule(int n) {     if(n==1)       ……

2820: 含k个3的数

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     long int m,n;     int s……

报数问题,C语言,简单语法,不用数学模型

摘要:解题思路://我的思路: //第一个人赋1,第二赋2,最后一人直接问是多少就是几号 //可以利用余数来创造一个既在增加的又在循环的数组//再利用contiune模拟被踢出圈子//再用m%3==0来踢人……