Submission #614334

#TimeUsernameProblemLanguageResultExecution timeMemory
614334PlurmBoarding Passes (BOI22_passes)C++11
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; char s[100005]; double solve(int n) { double ans = (((n + 1) / 4 - 1) * (n + 1) + 1) / 2.0; return max(ans, 0.0); } int main() { scanf("%s", s); int n = strlen(s); printf("%.6f\n", solve(n)); }

Compilation message (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...