题解列表

筛选

2544: N以内累加求和

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int n;    cin>>n;    int s……

【递归】母牛的故事

摘要:解题思路:每3年,小母牛成年,并在从第四个年头开始,每年年初也生一头小母牛。例:第 6 年有 6头 新的小母牛,3头 成年母牛,经过3年 6头 小母牛成年,并与其他成年母牛生出 9头 新的小母牛。总结……

2801: 奇数求和

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int n,m;    cin>>n>>m;    l……

题解 3011: 余数相同问题

摘要:解题思路:定义三个长整型变量,写循环和选择判断x;注意事项:在循环中输出完x后要终止循环,不然会超时;参考代码:#include <bits/stdc++.h>using namespace std;……

函数重载之比较大小

摘要:解题思路:思路比较简单,写三个重载的函数就行了。注意事项:参考代码:import java.util.*;   public class Main {     public static voi……

题解 2824: 求出e的值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double n,e=1,num=0;    cin……

2757:浮点数向零舍入

摘要:注意事项:参考代码:#include<stdio.h>int main(){    float a = 0;    scanf("%f",&a);    int b = 0;    b = a;   ……

Python代码(简洁)

摘要:s = input().strip() result = '' #注意超出字母表之后就会重新回到A或a for char in s: if char.isupper(): ……