답안 #666362

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
666362 2022-11-28T09:48:03 Z mychecksedad Boarding Passes (BOI22_passes) C++17
0 / 100
0 ms 212 KB
/* Author : Mychecksdead */
#include<bits/stdc++.h>
using namespace std;
#define setp() cout << setprecision(15)
#define all(x) x.begin(), x.end()
const int N = 1e5 + 100;

int n;
string s;
double dp[N];
void solve(){
    cin >> n >> s;
    dp[1] = 0;
    for(int i = 2; i <= n; ++i) dp[i] = dp[i - 1] + (i-1)/2.0;
    cout << dp[n];
}





int main(){
    cin.tie(0); ios::sync_with_stdio(0);
    int T = 1, aa;
    // cin >> T;aa=T;
    setp();
    while(T--){
        // cout << "Case #" << aa-T << ": ";
        solve();
        cout << '\n';
    }
    return 0;
 
}

Compilation message

passes.cpp: In function 'int main()':
passes.cpp:24:16: warning: unused variable 'aa' [-Wunused-variable]
   24 |     int T = 1, aa;
      |                ^~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '100800.5000000000', found: '0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '100800.5000000000', found: '0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -