C语言训练-委派任务* (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <cstring> #include <string> #include <cmath> #include …… 题解列表 2018年11月08日 1 点赞 0 评论 1014 浏览 评分:6.0
蓝桥杯算法训练VIP-友好数 (C语言代码) 摘要:#include "stdafx.h"int fun(int n){ int i, sum = 0; for (i = 1; i < n; i++) { if (n%i == 0) sum +=…… 题解列表 2018年11月08日 0 点赞 0 评论 894 浏览 评分:9.9
蓝桥杯算法训练VIP-反置数 (C语言代码) 摘要:#include "stdafx.h"int reverse(int n){ int a[100],i=0,t=1,sum = 0; do { a[i++] = n % 10; n /= 10; …… 题解列表 2018年11月08日 0 点赞 0 评论 784 浏览 评分:9.9
C语言训练-谁家孩子跑最慢* (C语言代码) 摘要:解题思路:注意事项:参考代码:最简答案.....printf("W");…… 题解列表 2018年11月08日 9 点赞 0 评论 876 浏览 评分:2.0
蓝桥杯2013年第四届真题-幸运数 (Java代码) 摘要:解题思路:注意事项:参考代码: import java.util.ArrayList; Scanner scanner = new Scanner(System.in); int m =…… 题解列表 2018年11月08日 2 点赞 0 评论 1334 浏览 评分:6.5
统计立方数 (C语言代码) 摘要:解题思路: 不用暴力判断是否是立方数,用pow函数,例如: y=pow(x,1/3.0),就是求x的1/3次方。然后再判断:y*y*y是否等于x即可,如果等于则是立方数。注意,为了防止pow函数出现误…… 题解列表 2018年11月08日 5 点赞 0 评论 2607 浏览 评分:9.7
蓝桥杯算法提高VIP-单词个数统计 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main( ){ char a[20]; int b = 1; scanf("%s"…… 题解列表 2018年11月08日 0 点赞 0 评论 586 浏览 评分:0.0
【计算两点间的距离】 (C++代码)讲讲公式,讲讲流输出控制位数 摘要:解题思路: 两点之间的距离公式 sqrt(pow(x2-x1,2),pow(y2-y1,2));注意由于负数不好开根所以建议使用abs进行绝对值运算,核心公式一步修改为sqrt(pow(abs(…… 题解列表 2018年11月08日 1 点赞 2 评论 2891 浏览 评分:5.3
蓝桥杯算法提高VIP-欧拉函数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int t(int n){ int ans = n; for(int i = 2;i * i <= n;i ++) {…… 题解列表 2018年11月08日 1 点赞 0 评论 1027 浏览 评分:0.0
C语言训练-计算1~N之间所有奇数之和 (C语言代码)记得高中的等差数列吗 T=O(1) 摘要:解题思路:等差数列前n项和:(首项+末项)x (项数) /2 首项: 1 末项: N 或 N-1 (N为奇数时末项就为N,为偶数时末项就为N-…… 题解列表 2018年11月08日 2 点赞 0 评论 1059 浏览 评分:0.0