solution.cpp 294 字节
Newer Older
每日一练社区's avatar
每日一练社区 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
using namespace std;
int main()
{
    for (int i = 1; i <= 50; i++)
    {
        for (int j = 50; j >= i; j--)
        {
            if ((i + j) * (j - i + 1) == 472)
            {
                cout << i << " " << j << endl;
            }
        }
    }
    return 0;
}