# MKOI R5 B florrio## 题目背景florriohttpsflorrio 是在洛谷知名度相对较高的一个 IO 小游戏。玩家在游戏中需要通过击杀地图中的生物以获取花瓣增强玩家实力从而挑战更高等级的生物。!httpscdnluogucomcnuploadimage_hostingeauqlxrfpng图为 NASFsky 截止到 2023715 的 florr 账号## 题目描述fl
#include <iostream>
#include <iomanip>
int main() {
int n;
double p;
std::cin >> n >> p;
double ans = 0;
for (int i = 0; i < n; i++) {
ans += 1.0 / (1 + i * (1 - p));
}
std::cout << std::fixed << std::setprecision(3) << ans << std::endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/ifPl 著作权归作者所有。请勿转载和采集!