题解列表
c++递归解决此问题
摘要:解题思路:主要找到每一项的关系,不难看出f(n)=f(n-1)+f(n-3)注意事项:参考代码:#include<iostream>
using namespace std;
//先写一个函数易知……
判断一个数能否同时被3和5整除
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ long long n; scanf("%lld",&n); if(n%3==0 && n%……
从大到小的顺序输出其中前m大的数
摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split())L = list(map(int,input().split()))L.sort(reverse = True……
编写题解 1046: [编程入门]自定义函数之数字后移 适合新手
摘要:解题思路:定义两个数组,一个用来接收改变后的排序,(m+i)%n 这个是核心 保证数组末尾的下一位是首位!!!注意事项:参考代码:#include<iostream>#include<cstri……
循环求和,一种简单的方法实现
摘要:解题思路:若 n = 5,设 变量 a = 0可推:2 = 2 x 1; (a)22 = 2 x 10 + 2 ( a = 2 * 10 + a)222 = 2 x 100 + 22 ( a = 2 ……
亲和数(python代码)
摘要:def cal(x):
total = 0
for i in range(1,x):
if x%i==0:
&nb
编写题解 1050: [编程入门]结构体之成绩记录 新手向 有问必回
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;struct student { string number……