답안 #1098949

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1098949 2024-10-10T11:02:05 Z ohad Boarding Passes (BOI22_passes) C++14
0 / 100
1 ms 344 KB
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <stdio.h>
using namespace std;
typedef long double ld;

int main() {
	string a;
	cin >> a;
	int size = a.length();
	int l = 0;
	ld b = size / 2;
	ld c = (size + 1) / 2;
	ld x = (c * (c-1)) +(b*(b-1)) / ld(4);
	cout << fixed << setprecision(6) << x;
}

Compilation message

passes.cpp: In function 'int main()':
passes.cpp:13:6: warning: unused variable 'l' [-Wunused-variable]
   13 |  int l = 0;
      |      ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st numbers differ - expected: '100800.5000000000', found: '252338.0000000000', error = '1.5033407572'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '1.0000000000', found: '7.5000000000', error = '6.5000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '1.0000000000', found: '7.5000000000', error = '6.5000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st numbers differ - expected: '100800.5000000000', found: '252338.0000000000', error = '1.5033407572'
2 Halted 0 ms 0 KB -