题解列表

筛选

2821: 开关灯

摘要:解题思路:注意事项:参考代码:#include <stdio.h>    int main()    {        int n, m, i, j,t=0;         int a[5001] ……

不使用二维数组进行求解

摘要:解题思路:因为是矩形,所以只要得到长和宽的数据,就可以求得其内的面积,同时无需关注每一位数字在图形中的位置,只要得到在1 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1……

2842: 大整数减法

摘要:解题思路:            drr[k]+=10;            drr[k+1]--;.//核心注意事项:参考代码:#include<stdio.h>#include<string.h……

题解 2783: 判断是否为两位数

摘要:解题思路:if 判断注意事项:条件参考代码:       int a;    scanf("%d",&a);    if(a>10&&a<99)    printf("%d",1);    else ……

电报加密(一看就会)

摘要:解题思路:直到b==&#39;\n&#39;才结束循环注意事项:b的值参考代码:#include<stdio.h> int main(){ char b; int i=0; while(……

2757: 浮点数向零舍入题解

摘要:解题思路:注意事项:参考代码:#include <iostream> #include <cmath> using namespace std; double round(double r) ……

2851: 合法C标识符

摘要:解题思路:注意事项:参考代码:#include<string.h>int main(){    char a[20];    int i,sum=0;    gets(a);    int len=s……

2839:石头剪刀布 c语言

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    int n,a,b,w=0,q=0;//w为B赢的次数,q为A赢的次数  ……

3005: 糖果游戏题解

摘要:解题思路:可以把这个问题看作是一个循环分配的过程,由于是圆桌,1号和5号小朋友也是相邻的。可以利用数组来模拟每个小朋友手中的糖果数量,通过计算每个小朋友分配后的糖果情况,更新数组中的值。通过模运算对索……