【C语言题解】蓝桥杯2023年第十四届省赛真题-平方差 摘要:``` #include int main(){ long int L,R,cnt; scanf ("%ld%ld",&L,&R); //x=y*y-z*z 即x…… 题解列表 2024年03月03日 4 点赞 3 评论 1332 浏览 评分:10.0
三国游戏-简单易看懂 摘要:解题思路:将胜国每个事件发生时相对于其他两国的兵力增量记录并排序,只要他的事件增量大于0,那么这个事件就可以发生,最后从三个国家获胜情况中找到最大的事件数即可注意事项:参考代码:#include<bi…… 题解列表 2024年03月03日 2 点赞 0 评论 1223 浏览 评分:9.3
1036: [编程入门]带参数宏定义练习 摘要:解题思路:定义一个带参的宏,使两个参数的值互换,并写出程序,输入两个数作为使用宏时的实参。参考代码:#include <stdlib.h> #include <stdio.h> #define…… 题解列表 2024年03月03日 0 点赞 0 评论 557 浏览 评分:0.0
链表之报数问题(C语言代码) 摘要:#include<stdio.h>#include<malloc.h>typedef struct people{ int number; struct people *next;}ST;…… 题解列表 2024年03月03日 1 点赞 0 评论 534 浏览 评分:0.0
1068: 二级C语言-温度转换 摘要:解题思路:注意事项:参考代码:def ctof(i): print('c=%d->f=%d'%(i,32 + i* 9/5))for i in range(-100,151,5)…… 题解列表 2024年03月03日 0 点赞 0 评论 1004 浏览 评分:0.0
愤怒的牛,二分解法 摘要:# 题目 2346: 信息学奥赛一本通T1433-愤怒的牛 **农夫 John 建造了一座很长的畜栏,它包括N(2≤N≤100,000)个隔间,这些小隔间依次编号为x1,...,xN(0≤xi≤…… 题解列表 2024年03月03日 0 点赞 0 评论 1013 浏览 评分:9.5
【C语言题解】蓝桥杯2023年第十四届省赛真题-更小的数 ```#include//定义数组来存放数的每一位intnumber[50050]={0};intcompare(int*a,int*b);intmain(){inta,i=0,j,k,cnt=0;//将数存放进数组while(scanf("%1d", 题解列表 2024年03月03日 0 点赞 0 评论 640 浏览 评分:0.0
使用Java的BigInteger类迅速解决整除问题 BigInteger类是java提供的用于大整数(可以超过long类型范围)计算的类构造方法:publicBigInteger(Stringval)获取指定的大整数常用方法:publicBigIntegeradd(BigIntegerval)加法publicBigIntegersubtract(Big 题解列表 2024年03月03日 0 点赞 0 评论 779 浏览 评分:9.9
累了,休息会 摘要:解题思路:注意事项:参考代码: #include<bits/stdc++.h> using nam…… 题解列表 2024年03月03日 0 点赞 0 评论 567 浏览 评分:9.9
编写题解 1861: 程序员爬楼梯 解题思路:类似于斐波那契数列不过递推公式为:F(n)=F(n-1)+F(n-3)注意事项:参考代码:n=int(input())dp=[1,1,2,3]#dp[i]中i阶i中方法ifn<5:print(dp[n-1])else:whileTrue:num=dp[-1]+dp[-3]dp.append( 题解列表 2024年03月03日 0 点赞 0 评论 569 浏览 评分:0.0