답안 #1078805

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1078805 2024-08-28T06:23:08 Z LIF Boarding Passes (BOI22_passes) C++14
5 / 100
2 ms 604 KB
#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
    cin>>s;
    long long int len = s.length();
    if(len %2 == 1)
    {
        double fir = len/2;
        double sec = len/2+1;
        double ans = (0+fir-1)*fir/4 + (0+sec-1)*sec / 4;
        printf("%.4lf",ans);
    }
    else
    {
        double fir = len/2;
        double sec = len/2;
        double ans = (0+fir-1)*fir/4 + (0+sec-1)*sec / 4;
        printf("%.4lf",ans);
    }









    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 1 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 1 ms 348 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 0 ms 348 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Correct 2 ms 604 KB found '772893586.0000000000', expected '772893586.0000000000', error '0.0000000000'
7 Correct 2 ms 604 KB found '1100977812.5000000000', expected '1100977812.5000000000', error '0.0000000000'
8 Correct 2 ms 580 KB found '1249950000.5000000000', expected '1249950000.5000000000', error '0.0000000000'
9 Correct 2 ms 604 KB found '1249975000.0000000000', expected '1249975000.0000000000', error '0.0000000000'
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 1 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 1 ms 348 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 0 ms 348 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Correct 2 ms 604 KB found '772893586.0000000000', expected '772893586.0000000000', error '0.0000000000'
7 Correct 2 ms 604 KB found '1100977812.5000000000', expected '1100977812.5000000000', error '0.0000000000'
8 Correct 2 ms 580 KB found '1249950000.5000000000', expected '1249950000.5000000000', error '0.0000000000'
9 Correct 2 ms 604 KB found '1249975000.0000000000', expected '1249975000.0000000000', error '0.0000000000'
10 Incorrect 0 ms 348 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
11 Halted 0 ms 0 KB -