Submission #778961

# Submission time Handle Problem Language Result Execution time Memory
778961 2023-07-11T05:35:44 Z vjudge1 Nadan (COCI18_nadan) C++17
50 / 50
1 ms 328 KB
#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
#define int long long int
#define pb push_back
#define N 105
int arr[N];
signed main(){
	lalala;
	int k,n;cin>>k>>n;
	for(int i=0;i<n-1;i++){
		arr[i]=i+1;
		k-=(i+1);
		
	}
	arr[n-1]+=k;
	for(int i=0;i<n;i++){
		cout<<arr[i]<<" ";
	}cout<<endl;


}


# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 316 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 316 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 328 KB Output is correct
10 Correct 0 ms 212 KB Output is correct