题解列表

筛选

题解 1095: The 3n + 1 problem

摘要:解题思路:注意事项:还得先比较输入的两个数的大小!!!参考代码#include<stdio.h> int main() {     int a,b,m,n,j,temp;     int su……

C++递归求解

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <vector>using namespace std;vector<int> f[100050];int dfs……

利用列表内置函数解决

摘要:解题思路:利用list函数count注意事项:参考代码:times = int(input())s = []for i in range(times):    s += [j for j in map……

逆序数——python

摘要:解题思路:注意事项:参考代码:n = int(input())L = list(map(int,input().split()))s = 0while len(L)>1:    a = L[0]   ……

Fibonacci数列——递归

摘要:解题思路:注意事项:参考代码:def fb(n):    if n == 1 or n == 2:        return 1    else:        return fb(n-1)+fb(……

寻找三位数

摘要:解题思路:注意事项:参考代码:for i in range(100,334):    a = 2*i    b = 3*i    if len(set(str(a)+str(b)+str(i))) =……

矩阵对角线求和

摘要:解题思路:注意事项:参考代码:a = list(map(int,input().split()))b = list(map(int,input().split()))c = list(map(int,……