Hello, world! (C语言代码) 摘要:解题思路:scanf函数返回值为-1时停止输入注意事项:数组a为char型时程序答案错误,查了一下原因应该是Ctrl+Z的ASCII码为26被成功写入数组的元素中,此时scanf函数返回值不为EOF,…… 题解列表 2018年03月30日 0 点赞 0 评论 978 浏览 评分:0.0
蓝桥杯历届试题-打印十字图 (C++代码) 摘要:/* ..$$$$$$$$$$$$$.. ..$...........$.. $$$.$$$$$$$$$.$$$ $...$.......$...$ $.$$$.$$$$$.$$$.$ $…… 题解列表 2018年03月30日 1 点赞 0 评论 1093 浏览 评分:0.0
蓝桥杯算法训练VIP-瓷砖铺放 (Java代码) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static int sum = 0; publi…… 题解列表 2018年03月30日 1 点赞 0 评论 1027 浏览 评分:0.0
蓝桥杯历届试题-数字游戏 (C语言代码) 摘要:解题思路:#include<stdio.h>int main(void){ int i,n,k,t; long long sum=1,a=1,cnt=1; scanf("%d%d%…… 题解列表 2018年03月30日 0 点赞 0 评论 988 浏览 评分:0.0
蓝桥杯历届试题-核桃的数量 (C++代码) 摘要:#include<iostream> using namespace std; int f(int a,int b){ return b?f(b,a%b):a; } int main(){…… 题解列表 2018年03月30日 1 点赞 0 评论 802 浏览 评分:0.0
数字整除 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> using namespace std; const int M=100+5; char…… 题解列表 2018年04月15日 0 点赞 0 评论 1621 浏览 评分:0.0
母牛的故事 (C语言代码) 摘要:解题思路:方法1:使用递归,但是递归效率太低,没进行一次函数的调用就压栈一次;方法2:将n年内所有会出现的母牛头数记录下来放在数组中,需要的时候去取数据,这样速度相当快;方法3:初始化前三年的母牛头数…… 题解列表 2018年03月30日 0 点赞 0 评论 654 浏览 评分:0.0
Hello, world! (Java代码) 摘要:解题思路:看代码即可注意事项:参考代码: public static void main(String[] args){ Scanner sc=new Scanner(System.…… 题解列表 2018年03月30日 0 点赞 0 评论 1087 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.4 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; int i; int S=0; printf("请输入n的值\n"); …… 题解列表 2018年03月30日 0 点赞 0 评论 787 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.2 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<string.h>int main(){ char str[1024]; char* p; int count1=0,count2=0,count3=0…… 题解列表 2018年03月30日 0 点赞 0 评论 1231 浏览 评分:0.0