# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
156889 | 2019-10-08T04:55:21 Z | junodeveloper | Nadan (COCI18_nadan) | C++14 | 2 ms | 376 KB |
#include <bits/stdc++.h> #define sz(x) ((int)x.size()) #define all(x) (x).begin(), (x).end() #define fi first #define se second using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; int n,k; int main() { scanf("%d%d",&k,&n); int i,s=0; for(i=1;i<n;i++) printf("%d\n",i),s+=i; printf("%d",k-s); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 256 KB | Output is correct |