题解列表

筛选

1109: Hanoi双塔问题-题解

摘要:解题思路:根据汉诺塔移动次数通项公式:ai = 2^i-1作答即可注意要乘2,因为每种大小汉诺塔片有2个,所以ai = 2*(2^i-1)注意事项:数据规模较大,须适用高精度用a数组累乘或减1最终求解……

使用C++进行成绩归类,简单明了

摘要:解题思路:注意事项:注意while循环就行了,其他的容易理解参考代码:#include<iostream>using namespace std;int main(){ int score=0,exc……

天才的写法

摘要:解题思路:注意事项:参考代码:while True:    try:        array = list(map(int, input().split()))        array_odd =……

java--study||O.o--动态规划

摘要:参考代码: import java.util.Scanner; public class Main { public static void main(String[] args) { ……

计算书费元组方法

摘要:解题思路:注意事项:参考代码:prices=[28.9,32.7,45.6,78,35,86.2,27.8,43,56,65]counts=list(map(int,input().strip().s……

错误示范-临时变量

摘要:#include<stdio.h>int main(){    int n;    long long int Sn=0;    scanf("%d",&n);        for(int i=1,……