题解列表

筛选

Jam的计数法C++

摘要:解题思路:  如果字符串的第一个字母已经是最大可能的字母退出循环;否则从最后一个字母开始遍历, 如果当前字母已经是最大可能字母, 退出循环; 否则, 当前字母加 1, 该字母之后的每一个字母,依据当前……

字符串分类统计

摘要:解题思路:注意事项:参考代码:#include <stdio.h>   #include <string.h> int main() {     int letters = 0, digit……

Python的辗转相除

摘要:def gcd(a,b):     while b:         a,b=b,a%b     return a a=int(input()) b=int(input()) print(……

辗转相除最终归纳!

摘要:1.c++写#include<bits/stdc++.h> using namespace std; int _gcd(int a,int b) {     while(b!=0)//可以简写……

最暴力的写法

摘要:#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=0;i<=n;i……