有一天,kotori发现了一个和lovelive类似的游戏:bangdream。令她惊讶的是,这个游戏和lovelive竟然是同一个公司出的!
kotori通过一段时间的练习后已经变得很是触,每一个音符 x% 的几率perfect,得到 分, (100−x)% 几率great,得到
分。 已知一首歌有 个音符。kotori想知道,不考虑连击加成的话,一首歌得分的指望是多少?ios
#include<iostream> using namespace std; const int mode = 1e9 + 7; int main() { //freopen("T.txt","r",stdin); int n,x,a,b; scanf("%d %d %d %d",&n,&x,&a,&b); double sum = n * (a/100.0 * x + b/100.0 *(100 - x)); printf("%.2lf",sum); return 0; }