题解列表

筛选

Pell数列非递归模式

摘要:解题思路:参照斐波那契数列的通项公式 f[i] = f[i-1] + f[i-2]类似的只需要在f2上*2最后f3%32376即可。注意事项:循环里面的计数要从2开始!参考代码:#include i……

买笔问题C语言

摘要:解题思路:以4为基准求余,余1,2,3,利用开关语句switch来控制。若买完x/4支4元钱的笔还剩1元,则4元钱的笔少买1支,换成1支5元笔即可;若买完x/4支4元钱的笔还剩2元,则4元钱的笔少买1……

简短易懂的

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){     char a; while ((a = getchar()) != EOF) { if (a == ……

交换值(超简单)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b;    scanf("%d%d",&a,&b);    printf("%d %d",b,……

编写题解 2829: 数1的个数

摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){     int n,x,i,count=0,t;     scanf("%d",&n);     fo……

A+B Problem(python)

摘要:解题思路:怎么同时输入多个数字 用map注意事项:参考代码: a,b=map(int,input().split())print(a+b)……

1094: 字符串的输入输出处理

摘要:解题思路:注意事项:参考代码:n=int(input())for i in range(n):    print(input(),end=&#39;\n\n&#39;)while True:    t……