C++立方和(水仙黑洞)

默认分类 | 2020-02-24 10:54:56 | 阅读 678 次 | 评论(0)


 int aaa = 0, aaaa = 0, a = 111, aa = a, jc = a; string zc = "";
 while (a < 999)
 { //缘由https://bbs.bccn.net/thread-499358-1-1.html
  if (aa)aaa = aa % 10, aaaa += aaa*aaa*aaa, aa /= 10;
  else
  if (jc == aaaa || zc.find(to_string(aaaa)) != string::npos)
   cout << a << "固定=>" << jc << endl, jc = aa = ++a, aaaa = 0, zc = "";
  else
   cout << jc << "=>" << (aaaa %= 1000) << ends, zc += to_string(aaaa) + "<>", jc = aa = aaaa, aaaa = 0;
 }

无标题.png (上传于2020-02-24 10:57:47)
无标题.png

文章评论,共0条
游客请输入验证码