Submission #493893

# Submission time Handle Problem Language Result Execution time Memory
493893 2021-12-13T09:58:38 Z watoKE Nadan (COCI18_nadan) C++17
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;

int n,a,b;
int dizi[500005],dizi2[500005],dizi3[500005];
vector<int> v;

int main()
{
    cin>>a>>b;
    int dgr=1;
    int sum=0;
    for (int i=0;i<b-1;i++)
    {
        cout<<dgr<<endl;
        sum+=dgr;
        dgr++;
    }
    cout<<a-sum;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct