最最简洁 通俗易懂的代码 摘要:解题思路: 由题目可知,我们要定义2个浮点型变量r、s。 要求输出s带两位小数,所以要以%.2f的格式打印。 s=r*r*PI ,这里不用另外定义一个变量PI,…… 题解列表 2024年11月05日 0 点赞 0 评论 1250 浏览 评分:9.9
用for嵌套解决国王的烦恼——发工资(C语言) 摘要:简单的for嵌套是无法解决的,我们需要加入一些判断才能解决。#include<stdio.h> #include<stdlib.h> int main(){ int n,coins=0,day=…… 题解列表 2024年11月06日 0 点赞 3 评论 265 浏览 评分:9.9
国王的烦恼——发工资,简单方法 摘要:解题思路:如果为6天,金币数为6-0+(6-0)-(0+1)+[(6-0)-(0+1)]-(0+1+1)=14,可推断出为n天时金币为(n-0)+(n-0)-(0+1)+[(n-0)-(0+1)]-(…… 题解列表 2024年11月06日 0 点赞 0 评论 250 浏览 评分:9.9
不一样的答案,新手必看 摘要:解题思路:新手都能看懂注意事项:放心食用参考代码:#include <stdio.h>int main() { int n,x,z; scanf("%d",&n); z=(n-2)*180; for…… 题解列表 2024年11月06日 0 点赞 0 评论 257 浏览 评分:9.9
苹果和虫子 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,b,a,x; scanf("%d %d %d",&n,&b,&a); x=n-(a…… 题解列表 2024年11月07日 0 点赞 0 评论 267 浏览 评分:9.9
与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,sum=0,i,x; scanf("%d %d",&a,&b); for(i=…… 题解列表 2024年11月07日 0 点赞 0 评论 277 浏览 评分:9.9
人口增长问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float a,b,i; scanf("%f %f",&a,&b); for(i=0;i<b;…… 题解列表 2024年11月07日 0 点赞 0 评论 318 浏览 评分:9.9
简单模拟 # 2576: 蓝桥杯2020年第十一届省赛真题-解码 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月07日 0 点赞 0 评论 161 浏览 评分:9.9
信息学奥赛一本通T1589-不要 62 数位dp 摘要: #include using namespace std; int l,r; int f[11][11]; void init(){ …… 题解列表 2024年11月07日 0 点赞 0 评论 255 浏览 评分:9.9
3行解决,使用count计数函数 摘要:解题思路:用count函数读取空格数量,再存入变量b,在加1完成注意事项:参考代码:# 1505a = input()b = a.count(" ",0,len(a)) + 1print(b)…… 题解列表 2024年11月07日 0 点赞 0 评论 254 浏览 评分:9.9