上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 182 下一页
摘要: 枚举View Code //poj1006#include <iostream>using namespace std;int a, b, c, d, t, dd;void work(){ a %= 23; b %= 28; c %= 33; dd = d; while (1) { d++; if (d % 23 == a && d % 28 == b && d % 33 == c) { printf("Case %d: the next triple peak occurs in... 阅读全文
posted @ 2012-12-02 16:50 undefined2024 阅读(205) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cmath>using namespace std;const double pi = 3.14159265;int work(){ double x, y, l; cin >> x; cin >> y; l = x * x + y * y; return int(l * pi / 100) + 1;}int main(){ int n, t; //freopen("t.txt", "r", stdin); t = 0; c 阅读全文
posted @ 2012-12-01 11:20 undefined2024 阅读(293) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>using namespace std;int main(){ int i; float l, ans = 0; //freopen("t.txt", "r", stdin); for (i = 0; i < 12; i++) { cin >> l; ans += l; } ans /= 12; printf("$%.2f\n", ans); return 0;} 阅读全文
posted @ 2012-12-01 11:15 undefined2024 阅读(235) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>using namespace std;int main(){ double now, c; int i; //freopen("t.txt", "r", stdin); while (cin >> c && c != 0) { now = 0; i = 2; while (now < c) { now += 1.0 / i; i++; } printf(... 阅读全文
posted @ 2012-11-28 19:56 undefined2024 阅读(130) 评论(0) 推荐(0)
摘要: 简单模拟View Code #include <iostream>#include <string>#include <algorithm>using namespace std;const int maxn = 100002;int n;string telephone[maxn];void make(string &a){ int i; for (i = 0; i < a.length(); i++) { while (a[i] == '-' && i < a.length()) a... 阅读全文
posted @ 2012-11-26 09:03 undefined2024 阅读(151) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 182 下一页