import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
double res = (1 + n) * n / 2.0;
System.out.println((long)res);
sc.close();
}
}
蓝桥杯--序列求和(java)
最新推荐文章于 2022-03-24 15:16:01 发布