Submission #71482337
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
int n;long long sum;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
sum+=i;
}printf("%lld\n",sum);
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Triangular Number |
| User | juruo_wzq_129 |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 163 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3904 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| 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 | 3752 KiB |
| example_01.txt | AC | 1 ms | 3780 KiB |
| example_02.txt | AC | 1 ms | 3736 KiB |
| hand_00.txt | AC | 1 ms | 3796 KiB |
| hand_01.txt | AC | 1 ms | 3780 KiB |
| hand_02.txt | AC | 1 ms | 3904 KiB |
| random_00.txt | AC | 1 ms | 3692 KiB |
| random_01.txt | AC | 1 ms | 3684 KiB |
| random_02.txt | AC | 1 ms | 3904 KiB |
| random_03.txt | AC | 1 ms | 3768 KiB |
| random_04.txt | AC | 1 ms | 3732 KiB |