
hdu
文章平均质量分 72
iam153
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu1.2.8(Identity Card)
#include<stdio.h>int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { char id[20]; scanf("%s", id); int x = (id[1] - 48)*(id[0] - 48); switch (x) { case 9:pri...原创 2018-03-10 10:00:17 · 2439 阅读 · 0 评论 -
hdu1.2.7(View code)
这题写了挺长时间,感觉还是写的有点繁琐。#include<stdio.h>#include<math.h>int count(int x) {//返回二进制x的位数 int i = 0; for (i = 0; x> 0; i++) { x -= pow(2, i); } return i;}int main() { int x; while ...原创 2018-03-10 10:03:31 · 180 阅读 · 0 评论 -
hdu1.31
#include<stdio.h>double per[1010], pri[1010], fo[1010];int main() { int i, j; double a, b; while (scanf("%lf %lf", &a, &b), a != -1) { for (i = 0; i < b; i++) { scanf("%lf %...原创 2018-03-10 12:25:29 · 136 阅读 · 0 评论