2 solutions

  • 0
    @ 2025-7-11 10:08:02

    题解

    • -1
      @ 2025-8-17 11:44:56
      #include<bits/stdc++.h>
      using namespace std;
      
      int main(){
      	long long n;
      	cin >>n;
      	long long ans = 0;
      for(int i = 1; i<=n; i++){
          ans+=i;
      }
      cout<<ans<<endl;
      
      	return 0;
      }
      
      
      • 1

      Information

      ID
      17946
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      3
      Tags
      (None)
      # Submissions
      89
      Accepted
      48
      Uploaded By