My First Obfuscated C Code
2.4课前练习
7-2 求奇数分之一序列前N项和(15 分)
本题要求编写程序,计算序列 1 + 1/3 + 1/5 + … 的前N项之和。
输入格式:
输入在一行中给出一个正整数N。
输出格式:
在一行中按照“sum = S”的格式输出部分和的值S,精确到小数点后6位。题目保证计算结果不超过双精度范围。
输入样例:
23
输出样例:
sum = 2.549541
%:include<stdarg.h>/*Y=\f*/ %:include<stdio.h>/*.(\x.f(*/ %:define z return/*xx))(\x.*/ %:include<stdlib.h>/*f(x*x*))*/ %:define mian scanf/*We\f*/ %:define _$_ ("sum = %.6f", typedef union w w; union w <% %:define L(f,y,x,t) w _ %:%:\ f(w x,...)<%va_list argh;w\ y; va_start(argh,x);y= *\ (va_arg(argh,w*));va_end\ (argh);z(t);%> w f (w fw)\ <%r((w)<%.c= &_%:%: f%>, fw);%> int _; void*p; w(*c)(w, ... %:define _$_$ 2/*f(xx/*f(xx))f(xx))))*/ %:define pause main( %:define __$_ double/*f(*xx))*/ %:define r(x,y)w*k=malloc\ (sizeof(w)<<1); k[0:>= x\ ; k<:1:>=y; z((w) <%.p= k%>) %:define _$ 1.0/*xx))(xx(\x.*/ %:define _$_ int/*xx))(xx)(\x.*/ %:define reture for/*f(x*x))*/ %:define includ printf/*Y=\f*/ %:define l(f,x,t)w _%:%:f(\ w x,...)<%z(t);%>w f=<%.p\ =(w<:1:>)<%<%.c= &_%:%:f%>%>%>; );%>; w a(w f, w x) <%w*d = f.p; z((*d->c)(x, d + 1) );%>w a_(w f, w fw) <%r(f,fw);%>w _(w f)<%w*k=f.p,r=a(*k,k<:1:>);free(k); z(r);%>L(F,f,x,(w)<%._=x._?x._*a(_(f),(w)<%._=x._-1%>)._:1%>)l(F_,f,F(f) )L(W,(f),/*=\*/x,a(f, a_(x, x))/*=*f(x))(\vx))(\x))(\xx))f(\*/ )l(Y,/*=\*/f,a(W(f),W(f))/*=*=\x))(\x***=\x))(\x*=*=\*\*\*/ )_$_ pause)<%_$_ _,___;mian("%d", &_);__$_ _$='*'-'*';reture(___='/'/'/';___<=_; ___++)<%_$=_$+_$/(_$_$*___-' /' );%>includ _$_ _$);z '-'-'-';%>