제출 #614337

#제출 시각아이디문제언어결과실행 시간메모리
614337PlurmBoarding Passes (BOI22_passes)C++11
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> using namespace std; char s[100005]; double solve(int n) { double ans = ((n / 4) * (n + 1) + (n % 4 == 3 ? 1 : 0)) / 2.0; return max(ans, 0.0); } int main() { scanf("%s", s); int n = strlen(s); printf("%.6f\n", solve(n)); }

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

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