제출 #338019

#제출 시각아이디문제언어결과실행 시간메모리
338019BeanZNadan (COCI18_nadan)C++14
50 / 50
1 ms364 KiB
// I_Love_LPL #include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' const int N = 3005; long long mod = 1e9 + 7; const int lim = 700; const int lg = 18; const int base = 311; const long double eps = 1e-6; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); if (fopen("tests.inp", "r")){ freopen("test.inp", "r", stdin); freopen("test.out", "w", stdout); } ll k, n; cin >> k >> n; for (int i = 1; i < n; i++){ cout << i << " "; k -= i; } cout << k; } /* Ans: Out: */

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

nadan.cpp: In function 'int main()':
nadan.cpp:16:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   16 |         freopen("test.inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
nadan.cpp:17:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   17 |         freopen("test.out", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...