常规解法 求金币 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,k=0,m=0,sum=0; cin>>n; …… 题解列表 2023年02月21日 0 点赞 0 评论 690 浏览 评分:9.9
国王的金币 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int day,money=0,mmoney=1,i…… 题解列表 2023年07月14日 0 点赞 0 评论 1042 浏览 评分:9.9
***********金币**************** 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a=0,n,sum=0; cin>>n…… 题解列表 2023年07月14日 0 点赞 0 评论 522 浏览 评分:9.9
题解 2833:只因币 摘要:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int sum=0,a=0 ; int n ; cin>>n…… 题解列表 2023年07月14日 0 点赞 0 评论 617 浏览 评分:9.9
简单的数学题 摘要:解题思路:题目可以理解为n天,每天给n块,换算成公式就是x=x+n*n,所以我们可以按公式算出来,然后增加一个判断,是否为1+2+3+4……+n的值,不是就减去。注意事项:参考代码:#include<…… 题解列表 2023年10月23日 0 点赞 0 评论 680 浏览 评分:9.9
优质题解 Yu金币简洁易懂写法 ##解析:本题无法直接循环天数和金币数。但是发现一个规律,连续的n天都发放n枚金币。我们可以用while循环解决连续n天发放n枚金币。**我的解法:**sum记录总金币,n代表总天数,day代表当前第几天。for循环里:用i代表该天应当获得的金币数,而day控制循环while循环:连续k天金币加i个。 题解列表 2023年11月10日 0 点赞 0 评论 970 浏览 评分:9.9
金币内置for循环 摘要:解题思路:注意事项:参考代码:n = int(input())sum = 0coin_per = 0day = 0q = 0while n > q: day += 1 coin_per +…… 题解列表 2023年11月14日 0 点赞 0 评论 696 浏览 评分:9.9
金币获取问题(python易理解写法) 摘要:解题思路:此题由于金币获取的方法,所以不能直接遍历天数和金币,所以要定义一个变量去过渡参考代码:n = int(input())day = 0 #天数sum = 0 #金币数for i i…… 题解列表 2023年12月13日 0 点赞 0 评论 731 浏览 评分:9.9
感觉还挺难的 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) …… 题解列表 2024年01月14日 0 点赞 0 评论 781 浏览 评分:9.9