POJ 1006
为什么提交上去老是说Wrong Answer,实例都通过了啊
题目地址:http://poj.org/problem?id=1006
#include <iostream>using namespace std;const int Physical = 23;const int Emotional = 28;const int Intellectual = 33;int main(){ int p, e, i, d; cin >> p >> e >> i >> d; int index = 1; while (p != -1) { p += 23; while (1) { while (p > e) e += Emotional; while (p < e) p += Physical; if (p == e && (e - i) % Intellectual == 0) break; else if (p == e) e += Emotional; } cout << "Case " << index << ": the next triple peak occurs in " << p - d << " days."; cin >> p >> e >> i >> d; index++; } return 0;}