Submission #85429

# Submission time Handle Problem Language Result Execution time Memory
85429 2018-11-19T21:40:34 Z Vicktor Nadan (COCI18_nadan) C++14
50 / 50
2 ms 652 KB
#include <iostream> 
using namespace std; 
int K,N,A[100]; 
int main() 
{ 
    cin.tie(0); ios_base::sync_with_stdio(0); 
    cin>>K>>N; 
    for (int i=1;i<=N;i++) { 
        A[i]=i; 
        K-=i; 
    } 
    A[N]+=K; 
    for (int i=1;i<=N;i++) cout<<A[i]<<endl; 
    return 0; 
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 400 KB Output is correct
4 Correct 2 ms 480 KB Output is correct
5 Correct 2 ms 500 KB Output is correct
6 Correct 2 ms 560 KB Output is correct
7 Correct 2 ms 636 KB Output is correct
8 Correct 2 ms 636 KB Output is correct
9 Correct 2 ms 652 KB Output is correct
10 Correct 2 ms 652 KB Output is correct