solution.cpp 349 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
using namespace std;
int main()
{
    int x, y;
    int count = 0;
    for (int i = 27; i <= 100; i++)
    {
        x = i / 10; //十位数
        y = i % 10; //个位数
        if (i - (x + 10 * y) == 27)
        {
            cout << i << endl;
            count++;
        }
    }
    cout << count << endl;
    return 0;
}