# 求公式的值

求 1-1/2!-1/3! -... -1/10! 

## template

```java
public class TEST {
	public static double jiecheng(int n) {
		double s = 1;
		for (int i = 1; i <= n; i++)
			s *= i;
		return s;
	}
	public static double sum(int n) {
		double sum = 0.0;
		int s = 1;
		for (int i = 1; i <= n; i++) {
			sum += s / jiecheng(i);
			s = -s;
		}
		return sum;
	}
	public static void main(String[] args) throws Exception {
		int n = 10;
		double ss = sum(n);
		System.out.println(ss);
	}
}
```

## 答案

```java

```

## 选项

### A

```java

```

### B

```java

```

### C

```java

```