题解列表
1179 上车人数 斐波那契数列的应用
摘要:# # 思路
先尝试一下计算出在某一站的总人数的通项公式,设a为第一站上车的人数,b为第二站上车和下车的人数,可计算出通项公式为`f1(n)*a+f2(n)*b`,其中:
f1(0)=f1(1)=……
蟠桃记(简单C++倒推)
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
int main()
{
int t,n,a[88]={1},i;
……
计算两点间的距离(简单C++)
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
#include<cmath>
#include<iomanip>
int mai……
计算球体积(简单C++)
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
#include<iomanip>
int main()
{
float……
2544一行解(Python)
摘要:注意事项:用sum直接计算列表中的值得和,input()得到的内容为str类型,range(N,M)左闭右开参考代码:print(sum(range(int(input())+1)))……
最大公约数与最小公倍数
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a, b; int i; scanf("%d %d", &a, &b); f……
2904: 谁拿了最多奖学金(c++代码)
摘要:```cpp
#include
using namespace std;
typedef struct Stu {
string name;
int g1;
int g2;
ch……
输出亲朋字符串(c++)
摘要:```cpp
#include
using namespace std;
int main(){
string s;
getline(cin,s);//此函数可读取整行,包括……