[蓝桥杯] 序列求和 入门

it2025-11-19  6

原题

import java.util.Scanner;//导入Scanner类 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextInt(); sc.close(); System.out.print((n+1)*n/2); } }

转载于:https://www.cnblogs.com/ruoh3kou/p/9948770.html

最新回复(0)