Submission #71472402


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int a[10000010],ans;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
ans+=i;
}
cout<<ans;
}

Submission Info

Submission Time
Task A - Triangular Number
User jiqihang
Language C++23 (GCC 15.2.0)
Score 100
Code Size 152 Byte
Status AC
Exec Time 1 ms
Memory 3600 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 11
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt
Case Name Status Exec Time Memory
example_00.txt AC 1 ms 3540 KiB
example_01.txt AC 1 ms 3548 KiB
example_02.txt AC 1 ms 3376 KiB
hand_00.txt AC 1 ms 3560 KiB
hand_01.txt AC 1 ms 3540 KiB
hand_02.txt AC 1 ms 3472 KiB
random_00.txt AC 1 ms 3384 KiB
random_01.txt AC 1 ms 3384 KiB
random_02.txt AC 1 ms 3472 KiB
random_03.txt AC 1 ms 3600 KiB
random_04.txt AC 1 ms 3384 KiB