题解列表

筛选

编写题解 2779: 输出绝对值

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

编写题解 2778: 判断数正负

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

 编写题解 2764: 带余除法

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

解决蓝桥杯中的分糖果问题

摘要:参考代码:n=int(input()) m=list(map(int,input().split())) ans=0 #老师补发糖果的个数 while m.count(m[0]) != n:  ……

求小数的末尾3位

摘要:需要明确一点就是:无论a的多少次幂,都是末尾的数先乘以a再考虑向前进位,因此本题直接考虑每次幂的末尾3位,将每次的末尾3位乘以a循环进行b次#include<stdio.h> int main(vo……

最小公倍数——辗转法

摘要:解题思路:辗转相除法注意事项:参考代码:a,b = map(int,input().split())c,d = a,bif a>b:    a,b = b,ar = a%b while r !=0: ……

编写题解 1267: A+B Problem

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

分数求和递归解法(C++)

摘要:参考代码:#include <iostream> using namespace std; void getSum(int n,int up, int down); int main() ……