买笔买笔30083008 摘要:解题思路:#include <iostream>using namespace std;int main(int argc, char** argv){int x,y,a,b,c;cin>>x;c=x…… 题解列表 2024年01月07日 0 点赞 0 评论 96 浏览 评分:2.0
买笔(三for循环) 摘要:解题思路:注意事项:注意要把5放在最外层循环,因为输入10的时候会出现两个5块钱的笔的特殊情况,所以不考虑,因此最先考虑4和6的情况,4放最内层,因为当输入的数为4和6的最小公倍数时,四的除数更大,所…… 题解列表 2022年11月10日 0 点赞 0 评论 313 浏览 评分:6.0
c++买笔c++买笔c++买笔c++买笔c++买笔 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int x; cin>>x; if(x%4==0)…… 题解列表 2024年01月07日 0 点赞 1 评论 110 浏览 评分:6.0
编写题解 3008: 买笔, 摘要:解题思路:注意事项:只因你太美参考代码:#include <iostream>using namespace std;int main(int argc, char** argv) {int x,y,…… 题解列表 2023年02月06日 0 点赞 2 评论 259 浏览 评分:8.0
买笔问题C语言 摘要:解题思路:以4为基准求余,余1,2,3,利用开关语句switch来控制。若买完x/4支4元钱的笔还剩1元,则4元钱的笔少买1支,换成1支5元笔即可;若买完x/4支4元钱的笔还剩2元,则4元钱的笔少买1…… 题解列表 2022年12月11日 0 点赞 1 评论 642 浏览 评分:8.4
3008: 买笔(c++代码) 摘要:```cpp #include using namespace std; int main() { int x,a,b,c,i=0,j=0,k=0; cin>>x; …… 题解列表 2023年01月08日 0 点赞 0 评论 433 浏览 评分:8.6
3008: 买笔题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; char c; int result; scanf("%d%d",&a…… 题解列表 2024年11月24日 2 点赞 1 评论 184 浏览 评分:8.7
编写题解 3008: 买笔 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ long long x; cin>>x; if(x…… 题解列表 2024年11月24日 1 点赞 2 评论 142 浏览 评分:9.9
不懂可评论 摘要:解题思路:注意事项:参考代码:x=int(input()) for pen4 in range(x//4,-1,-1):#优先买4元的笔,开始循环递减到0结束 remaining=x-pe…… 题解列表 2024年11月21日 0 点赞 0 评论 99 浏览 评分:9.9
买笔 C语言解 摘要:解题思路:注意事项:不能够有剩余的钱,且所买笔的数量尽量多参考代码:#include <stdio.h>int main(){ int a; int c,b; scanf( "%d"…… 题解列表 2024年02月19日 0 点赞 0 评论 218 浏览 评分:9.9