LOTT - Xổ số

Tác giả: skyvn97

Ngôn ngữ: C++

#include<cstdio>
#include<iostream>
#include<string>
using namespace std;
string s;
int n;
int main(void) {
	ios::sync_with_stdio(false);
	while (true) {
		cin >> s;
		if (s=="[END]") return 0;		
		cin >> n;
		printf("%.7lf\n",24.0*(125LL*n*(n-1)*(n-2)+100LL*n*(n-1)+25LL*n*(n-1)+n)/(1LL*n*(5*n-1)*(5*n-2)*(5*n-3)*(5*n-4)));
	}	
}

Download