2826: 雇佣兵 摘要:解题思路:注意事项:参考代码:import mathm,n,x=map(int,input().strip().split())while x*n >= m : x -= math.ceil(m…… 题解列表 2024年07月31日 0 点赞 0 评论 639 浏览 评分:0.0
2826: 雇佣兵 (几种解法,存疑) 摘要:以下有两种思路的代码,第一种: ```c int main() { int zhan,neng,M,N,X; scanf("%d%d%d",&M,&zhan,&ne…… 题解列表 2024年04月22日 0 点赞 4 评论 388 浏览 评分:0.0
2826: 雇佣兵 摘要:参考代码:m, n, x = map(int, input().split()) a = 0 while x > 0: x -= 1 a += n if a >= m… 题解列表 2024年03月19日 0 点赞 0 评论 649 浏览 评分:0.0
雇佣兵(while循环) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int m,n,x,i,a; scanf("%d %d %d",&m,&n,&x…… 题解列表 2022年12月07日 0 点赞 0 评论 576 浏览 评分:0.0
感觉这个代码没什么毛病,但是就是有两个测试点过不了,球球帮孩子看看 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include<string.h>#include<math.h>int main(){ …… 题解列表 2023年03月03日 0 点赞 3 评论 551 浏览 评分:0.0
2826: 雇佣兵 摘要:#include<stdio.h> #include<math.h> int main() { int m,n,x; scanf("%d %d %d",&m,&n,&x)…… 题解列表 2023年02月28日 0 点赞 0 评论 573 浏览 评分:0.0
2826: 雇佣兵(python) 摘要:解题思路:注意事项:参考代码:from decimal import * M,N,X = map(int,input().split()) while X > 0 and X * N >= M: …… 题解列表 2023年02月22日 0 点赞 0 评论 529 浏览 评分:0.0
whilewhilewhile,这个代码短,但是效率低一点,while还不熟练哈哈 摘要:解题思路:swap转换注意事项:参考代码:#include<stdio.h> int main() { int m, n, x; scanf("%d %d %d", &m, &n…… 题解列表 2023年01月19日 0 点赞 0 评论 467 浏览 评分:0.0
挺有趣的哈哈这题目,这个代码有详细解读代码长 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,M,n,x,i; scanf("%d %d %d",&M,&n,&x); //M为最大体力值,n为…… 题解列表 2023年01月19日 0 点赞 0 评论 557 浏览 评分:0.0
(c语言)详细解读,算法简单易懂 摘要:解题思路: 题目我整理一下,初始体力0,每消耗一点能量,体力增加一次当前战斗力的值。同一个战斗期内,每经过战斗力数值的天数,战斗力加1。注意事项: 在一个战斗期内,战斗力是不会提升的。 …… 题解列表 2023年01月03日 0 点赞 0 评论 633 浏览 评分:0.0