#include <bits/stdc++.h>using namespace std; class Solution { public: void solve() { int a, b, x, y, k; cin >> a >> b >> x >> y >> k; int p = (a + (x * k)); int d = (b + (y * k)); (p < d) ? cout << "PETROL" : (p > d) ? cout << "DIESEL" : cout << "SAME PRICE"; cout << "\n"; } }; int main() { int n; cin >> n; Solution s; while (n--) { s.solve(); } return 0; }
1 Comments
This comment has been removed by the author.
ReplyDelete