1041: 数列求和2
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n,x=1;double sum=0;n=cin.nextInt();for(int i=1;i<=n;i++){
sum+=1.0/(2*i-1)*x;x=-x;}System.out.printf("%.2f",sum);}
}