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)
猜你喜欢
转载自blog.csdn.net/QinLaoDeMaChu/article/details/104077133
今日推荐
周排行