首页 > 其他 > 详细

Cantor 的数表

时间:2015-07-08 16:15:04      阅读:216      评论:0      收藏:0      [点我收藏+]
技术分享

#include <stdio.h> #include <math.h> int main() { int n; while(scanf("%d",&n)==1) { int k =(int)floor((sqrt(8.0*n+1)-1)/2-1e-9)+1; int s = k*(k+1)/2; printf("%d/%d\n",s-n+1,k-s+n); } }

技术分享

Cantor 的数表

原文:http://www.cnblogs.com/zhuyaguang/p/4630395.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!