# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
313476 |
2020-10-16T05:54:54 Z |
PixelCat |
Nadan (COCI18_nadan) |
C++14 |
|
1 ms |
384 KB |
/* _____ __ __
/^--^\ | () )\ \/ /
\____/ |_()_) |__|
/ \ _____ _ __ __ ____ _ ____ ____ _____
| || ()_)| |\ \/ /| ===|| |__ / (__` / () \|_ _|
\__ __/ |_| |_|/_/\_\|____||____|\____)/__/\__\ |_|
|^|^\ \^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|^|
| | |\ \| | | | | | | | | | | | | | | | | | | | | | | | |
#####/ /#################################################
| | |\/ | | | | | | | | | | | | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| |
#include <Orz/i_am_noob.h>
#include <Orz/balbit.h>
#include <Orz/nathanlee726.h>*/
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
using pii=pair<ll,ll>;
#define int ll
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Forr(i,a,b) for(int i=a;i>=b;i--)
#define F first
#define S second
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define mkp make_pair
#define MOD (ll)(1e9+7)
#define INF (1e18)
#define EPS (1e-6)
#ifdef LOCALMEOW
#define debug(...) do{\
cerr << __PRETTY_FUNCTION__ << " - " << __LINE__ <<\
" : ("#__VA_ARGS__ << ") = ";\
_OUT(__VA_ARGS__);\
}while(0)
template<typename T> void _OUT(T x) { cerr << x << "\n"; }
template<typename T,typename...I>
void _OUT(T x,I ...tail) { cerr << x << ", "; _OUT(tail...); }
#else
#define debug(...)
#endif
void INIT(){ ios::sync_with_stdio(false); cin.tie(0); }
int gcd(int a,int b) { return b==0?a:gcd(b,a%b); }
int lcm(int a,int b) { return a/gcd(a,b)*b; }
int fpow(int b,int p){
int ans=1,now=b;
while(p){
if(p&1) ans=ans*now%MOD;
p/=2; now=now*now%MOD;
}
return ans;
}
int32_t main(){
INIT();
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//I won't misunderstand the problem statement anymore.
//code...
int k,n; cin>>k>>n;
For(i,1,n-1){
cout<<i<<"\n";
k-=i;
}
cout<<k<<"\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
1 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
1 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
0 ms |
384 KB |
Output is correct |