Submission #614336

#TimeUsernameProblemLanguageResultExecution timeMemory
614336PlurmBoarding 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 % 2 == 1 ? 1 : 0)) / 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...