【数字黑洞2178】2022-10-28
缘由关于#python#数字黑洞2178的问题,请各位专家解答!-编程语言-CSDN问答
void 数字黑洞2178()
{//缘由https://ask.csdn.net/questions/7820567int n = 0, nn = 0, f = 0, j = 0;cin >> n;if (n > 999)while (n && n != 2178){nn = n;while (nn)f = f * 10 + nn % 10, nn /= 10;n -= f;if (n < 0)n = -n;++j; f = 0;}cout << j << "次运算\n";
}