二级C语言-成绩归类 摘要:参考代码:#include <stdio.h>int main(){ int n; int a,b,c; a=b=c=0; scanf("%d",&n); while (n!=0) { if (n>8…… 题解列表 2024年11月30日 0 点赞 0 评论 371 浏览 评分:0.0
[编程入门]自定义函数处理最大公约数与最小公倍数 C语言 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; int t,j; scanf("%d%d",&a,&b); j=a*b; while(1) {…… 题解列表 2024年11月30日 0 点赞 0 评论 760 浏览 评分:0.0
三行秒杀大象喝水 摘要:解题思路:map函数接收输入注意事项:至少喝几桶水用向上取整参考代码:import mathh,r=map(int,input().split())print(math.ceil(20000/(h*m…… 题解列表 2024年11月30日 0 点赞 0 评论 423 浏览 评分:0.0
瞎七八解释的挺清楚的了 摘要:解题思路:1. 我们需要每次消耗多少能量才能达到体力最大值?每次消耗 m/n 个能量就会让体力达到最大值,体力最大值恒定不变为5 ;但是由于我们每次消耗能量至少一个,所以实际上我们要让体力达到最大值需…… 题解列表 2024年11月30日 0 点赞 0 评论 226 浏览 评分:0.0
不废话直接秒 摘要:解题思路:floor函数向下取整注意事项:参考代码:import mathn,x,y=map(int,input().split())print(math.floor(n-1/x*y))…… 题解列表 2024年11月30日 0 点赞 0 评论 356 浏览 评分:0.0
输入判定有坑,需要判断4个数据是否在一行 摘要:解题思路:注意事项:参考代码:import mathnum=list(map(float,input().split()))if len(num)==4: print(f'{math.s…… 题解列表 2024年11月30日 1 点赞 0 评论 298 浏览 评分:0.0
注意q和p不能放在整数型里 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n; double Sn=0,q=2.0,p=1.0; scanf("%d",&n…… 题解列表 2024年11月30日 0 点赞 0 评论 231 浏览 评分:0.0
海伦公式秒杀 摘要:解题思路:注意事项:参考代码:import mathnum=list(map(float,input().split()))a=math.sqrt((num[3] - num[1]) ** 2 + (…… 题解列表 2024年11月30日 0 点赞 0 评论 353 浏览 评分:0.0
两行直接秒 摘要:解题思路:map输入三数print输出首项+d*(n-1)注意事项:参考代码:a1,a2,n=map(int,input().split())print(a1+(a2-a1)*(n-1))…… 题解列表 2024年11月30日 0 点赞 0 评论 195 浏览 评分:0.0
蓝桥杯算法提高VIP-队列操作 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量n, k, l int n, k, l; // 定义一…… 题解列表 2024年11月30日 0 点赞 0 评论 257 浏览 评分:0.0