1. 首页
  2. 技术
  3. 后台

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

 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)


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

原创文章,作者:xianfajushi的博客,如若转载,请注明出处:https://www.zengqueling.com/c%e7%ab%8b%e6%96%b9%e5%92%8c%ef%bc%88%e6%b0%b4%e4%bb%99%e9%bb%91%e6%b4%9e%ef%bc%89/

联系我们

15602395067

在线咨询:点击这里给我发消息

邮件:eden7@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code