#include <bits/stdc++.h>
using namespace std;
const int max_n = 100111, inf = 1000111222;
int n, a[max_n], b[max_n];
long double p[max_n], best = 0, ans = 0;
long long t;
long double get(int a, long double p) {
long double res = 0, cur = 1;
long double q = 1 - p;
res = (a + t * best) * (1 - pow(q, t));
res -= p * best * (pow(q, t) * (t * q - t - 1) + 1) / (q - 1) / (q - 1);
return res;
for (int i = 1; i <= t; ++i) {
res -= cur * p * i * best;
cur *= (1 - p);
}
return res;
}
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
scanf("%d%I64d", &n, &t);
for (int i = 0; i < n; ++i) {
double x;
scanf("%d%d%lf", &a[i], &b[i], &x);
p[i] = x;
best = max(best, p[i] * b[i]);
}
for (int i = 0; i < n; ++i) {
long double res = get(a[i], p[i]);
ans = max(ans, res);
}
cout << fixed << setprecision(20) << ans << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IG1heF9uID0gMTAwMTExLCBpbmYgPSAxMDAwMTExMjIyOwoKaW50IG4sIGFbbWF4X25dLCBiW21heF9uXTsKbG9uZyBkb3VibGUgcFttYXhfbl0sIGJlc3QgPSAwLCBhbnMgPSAwOwpsb25nIGxvbmcgdDsKCmxvbmcgZG91YmxlIGdldChpbnQgYSwgbG9uZyBkb3VibGUgcCkgewogICAgbG9uZyBkb3VibGUgcmVzID0gMCwgY3VyID0gMTsKICAgIGxvbmcgZG91YmxlIHEgPSAxIC0gcDsKICAgIHJlcyA9IChhICsgdCAqIGJlc3QpICogKDEgLSBwb3cocSwgdCkpOwogICAgcmVzIC09IHAgKiBiZXN0ICogKHBvdyhxLCB0KSAqICh0ICogcSAtIHQgLSAxKSArIDEpIC8gKHEgLSAxKSAvIChxIC0gMSk7CiAgICByZXR1cm4gcmVzOwogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gdDsgKytpKSB7CiAgICAgICAgcmVzIC09IGN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