6 solutions

  • 1
    @ 2022-5-7 12:59:35

    #include<stdio.h> int main() { long long i,n,sum; scanf("%lld",&n); for(i=1,sum=0;i<=n;i++) sum=sum+i; printf("%lld\n",sum); }

    Information

    ID
    34
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    2824
    Accepted
    410
    Uploaded By