http://acm.sgu.ru/problem.php?contest=0&problem=403

给出一个数x,求出数n使得n是n之前所有数(包括n)的总和的1/x,由求和公式直接推出n=2*x+1

#include <stdio.h>

int main(void) {
    
int x;
    scanf (
"%d"&x);
    printf (
"%d\n"2*x+1);
    
return 0;
}

posted on 2010-05-11 14:10 Willing 阅读(351) 评论(0)  编辑 收藏 引用 所属分类: ACM