제출 #455150

#제출 시각아이디문제언어결과실행 시간메모리
455150shahriarkhanNadan (COCI18_nadan)C++14
50 / 50
1 ms320 KiB
#include<bits/stdc++.h> using namespace std ; int main() { int k , n ; scanf("%d%d",&k,&n) ; vector<int> ans ; for(int i = 1 ; i < n ; ++i) { ans.push_back(i) ; k -= i ; } ans.push_back(k) ; for(int i : ans) { printf("%d\n",i) ; } return 0 ; }

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

nadan.cpp: In function 'int main()':
nadan.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |     scanf("%d%d",&k,&n) ;
      |     ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...