題目:Automated Telephone Exchange
poj URL:http://poj.org/problem?id=4011
原題如下圖:

題意:
就是一個三位數減去兩個小於或等於99的數的差為0,滿足這個條件的數的個數。只要用標准輸入輸出就可以了。
下面是我Accepted的代碼:
1 #include <iostream>
2 using namespace std;
3
4 int main()
5 {
6 int ATE;
7 cin >> ATE;
8 int out = 0;
9 int a,b;
10 for(a = 0;a<100;a++){
11 b = ATE-a;
12 if(b >= 0 and b <= 99) out++;
13 }
14 cout << out;
15 return 0;
16 }
PS:好水的一道題呀 T T