描述
题解
打表即可。
代码
#include <iostream>
using namespace std;
const int NarNum[] = {
153, 370, 371, 407, 1634};
int main(int argc, const char * argv[])
{
int M;
while (cin >> M)
{
for (int i = 0; i < 5; i++)
{
if (NarNum[i] >= M)
{
cout << NarNum[i] << '\n';
break;
}
}
}
return 0;
}