2 条题解

  • 1
    @ 2024-3-10 19:22:52

    #include<bits/stdc++.h> using namespace std; int main() { int n;cin>>n; cout< a1, a2, a3..... an an,an-1,an-2.....a1 (a1+an)*n/2=(1+n)*n/2

    • 0
      @ 2023-1-7 13:38:03
      N = int(input())
      """
      numList = list(range(1,N+1))
      print(sum(numList))
      """
      s = 0 
      for i in range(1,N+1):
          s+=i
      print(s)
      
      
      • 1

      信息

      ID
      1563
      时间
      1000ms
      内存
      128MiB
      难度
      3
      标签
      递交数
      27
      已通过
      19
      上传者