2013年12月22日

hdoj1008解题报告

摘要: 题意:坐电梯,上一层楼需要6秒,下一层楼需要4秒,在每一层会停留5秒,电梯开始在0层,输入要去的各个层,输出所需要的时间#include using namespace std;int main(){ int n; int step[101] = {0}; while (true)... 阅读全文

posted @ 2013-12-22 13:25 冰迹风痕 阅读(149) 评论(0) 推荐(0)

hdoj1005解题报告

摘要: 题意:f(1) = 1, f(2) = 1,f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.输入A,B和n,输出f(n);#include using namespace std;int main(){ int f[1010]; int A, B; ... 阅读全文

posted @ 2013-12-22 13:21 冰迹风痕 阅读(149) 评论(0) 推荐(0)

hdoj1004解题报告

摘要: 题意:输入各种颜色的气球,输出气球数量最多的气球的颜色#include #include using namespace std;int main(){ int n; char ball[1001][40]; while (true) { cin >> n; ... 阅读全文

posted @ 2013-12-22 13:17 冰迹风痕 阅读(98) 评论(0) 推荐(0)

hdoj1000解题报告

摘要: 题意:计算A+B#include int main(){ int a, b; while (scanf("%d%d", &a, &b) != EOF) { printf("%d\n", a + b); }} 阅读全文

posted @ 2013-12-22 13:13 冰迹风痕 阅读(132) 评论(0) 推荐(0)

hdoj1001解题报告

摘要: 第一次写解题报告,找了个最简单的.题意:输入一个数n,输出从1+2+3+...+n.没什么好说的#include int main(){ int n; while (scanf("%d", &n) != EOF) { int sum = 0; for (... 阅读全文

posted @ 2013-12-22 13:08 冰迹风痕 阅读(218) 评论(0) 推荐(0)

导航