제출 #702135

#제출 시각아이디문제언어결과실행 시간메모리
702135chenyanNadan (COCI18_nadan)C++17
50 / 50
1 ms324 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define pii pair<int,int> #define ff first #define ss second #define all(x) x.begin(),x.end() #define pb emplace_back #define N 200010 signed main(){ ios::sync_with_stdio(0); cin.tie(0); int n,k,i,j,ans=0; cin>>n>>k; for(i=1;i<=k-1;i++){ cout<<i<<'\n'; ans+=i; } cout<<n-ans<<'\n'; }

컴파일 시 표준 에러 (stderr) 메시지

nadan.cpp: In function 'int main()':
nadan.cpp:13:12: warning: unused variable 'j' [-Wunused-variable]
   13 |  int n,k,i,j,ans=0;
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...