上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 56 下一页
摘要: #include #include #include using namespace std; int main() { int n; double m; while(scanf("%d", &n) && n != 0) { int a = 0, b = 0, c = 0; while(n --) { scanf("%lf", &m); if(m > 0... 阅读全文
posted @ 2019-07-23 16:43 青衫客36 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目没有说明m和n的大小, 自己要进行一次判断 阅读全文
posted @ 2019-07-23 16:35 青衫客36 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int main() { int n, a, sum; while(~scanf("%d", &n)) { sum = 1; while(n --) { scanf("%d", &a); if(a % 2 == 1) { sum *= a; ... 阅读全文
posted @ 2019-07-23 16:21 青衫客36 阅读(299) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; bool is_leap_year(int y) { if((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) return true; else return false; } int main() { int month[13]... 阅读全文
posted @ 2019-07-23 16:15 青衫客36 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 第一次遇见case 0 ... 5 这种写法, 这样写使得使用case写代码简化了不少, 0...5只能升序, 不能写成5...0 一定要注意, 不能直接写一个default来处理其他情况, 加入输入负数的话, switch中得到了0, 则会输出E, 所以要在输入是判断输入的数字是否在0~100之间 阅读全文
posted @ 2019-07-23 15:56 青衫客36 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define PI 3.1415927 using namespace std; int main() { double a; while(~scanf("%lf", &a)) { printf("%.2f\n", fabs(a)); } return 0; } 阅读全文
posted @ 2019-07-23 15:23 青衫客36 阅读(90) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define PI 3.1415927 using namespace std; int main() { double r; while(~scanf("%lf", &r)) { printf("%.3f\n", 4.0/3.0*PI*r*r*r); } return 0; } 阅读全文
posted @ 2019-07-23 15:20 青衫客36 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int main() { double x1, y1, x2, y2, d; while(~scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2)) { d = sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 ... 阅读全文
posted @ 2019-07-23 15:16 青衫客36 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char c, a[3]; int i = 0; while(~scanf("%c", &c)) { a[i] = 阅读全文
posted @ 2019-07-23 15:02 青衫客36 阅读(560) 评论(0) 推荐(0) 编辑
摘要: # coding = utf-8 from tensorflow.examples.tutorials.mnist import input_data import scipy.misc import os # 读取MNIST数据集, 如果不存在会事先下载 mnist = input_data.read_data_sets('MNIST_data/', one_hot=True) # 把原始... 阅读全文
posted @ 2019-07-20 21:16 青衫客36 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 56 下一页