Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
511 B
1
Indexable
Never
#include <iostream>
using namespace std;
typedef unsigned long long ull;
typedef double db;
ull func(db w, db l, db k) 
{
	db newa, newk;
	if (w * l > 100)
	{
		newa = (w * l) - 100;
		newk = k - ((k * 0.01)*10);
		return  (100*k) + (newa * newk);
	}
	else return w * l * k;

};
int main() {
	int n; cin >> n;
	db w, l, k;
	int mas[100];
	for (int i = 0; i < n; i++)
	{
		cin >> w >> l >> k;
		mas[i] = func(w, l, k);
	}
	for (int i = 0; i < n; i++)
	{
		cout << mas[i] << " ";
	}
}