用for嵌套解决国王的烦恼——发工资(C语言) 摘要:简单的for嵌套是无法解决的,我们需要加入一些判断才能解决。#include<stdio.h> #include<stdlib.h> int main(){ int n,coins=0,day=…… 题解列表 2024年11月06日 0 点赞 3 评论 380 浏览 评分: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 评论 335 浏览 评分:9.9
不一样的答案,新手必看 摘要:解题思路:新手都能看懂注意事项:放心食用参考代码:#include <stdio.h>int main() { int n,x,z; scanf("%d",&n); z=(n-2)*180; for…… 题解列表 2024年11月06日 0 点赞 0 评论 321 浏览 评分: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 评论 357 浏览 评分: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 评论 360 浏览 评分: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 评论 403 浏览 评分:9.9
简单模拟 # 2576: 蓝桥杯2020年第十一届省赛真题-解码 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月07日 0 点赞 0 评论 227 浏览 评分:9.9
信息学奥赛一本通T1589-不要 62 数位dp 摘要: #include using namespace std; int l,r; int f[11][11]; void init(){ …… 题解列表 2024年11月07日 0 点赞 0 评论 326 浏览 评分:9.9
3行解决,使用count计数函数 摘要:解题思路:用count函数读取空格数量,再存入变量b,在加1完成注意事项:参考代码:# 1505a = input()b = a.count(" ",0,len(a)) + 1print(b)…… 题解列表 2024年11月07日 0 点赞 0 评论 338 浏览 评分:9.9
信息学奥赛一本通T1173-阶乘和--运用高精度乘法与加法:计算n的阶乘和 摘要:解题思路:因为n<=50;当n>20最大存储整数类型long long也存储不下,导致造成数据溢出。所以运用高精度乘法与加法计算n的阶乘和参考代码:#include <iostream>#includ…… 题解列表 2024年11月07日 0 点赞 0 评论 527 浏览 评分:9.9