제출 #209511

#제출 시각아이디문제언어결과실행 시간메모리
209511model_codeSnail (NOI18_snail)C++17
20 / 100
5 ms376 KiB
#include <bits/stdc++.h> using namespace std; long long H, N; int main() { scanf("%lld%lld", &H, &N); long long x; scanf("%lld", &x); if (x <= 0) puts("-1 -1"); else { long long steps = ((H+(x-1))/x); long long d = (steps-1)/N; long long p = (steps-1)%N; printf("%lld %lld\n", d, p); } }

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

snail.cpp: In function 'int main()':
snail.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld", &H, &N);
  ~~~~~^~~~~~~~~~~~~~~~~~~~
snail.cpp:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld", &x);
  ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...