My issue
include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
// your code goes here
int t;
cin >> t;
while (t–) {
int x, y;
cin >> x >> y;
cout << y << ’ ’ << y << ’ ’ << 3 * x - 2 * y << endl;
}
}
IAM GETIING WRONG ANSWER AS OUTPUT
My code
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
// your code goes here
int t;
cin >> t;
while (t--) {
int x, y;
cin >> x >> y;
cout << y << ' ' << y << ' ' << 3 * x - 2 * y << endl;
}
}
Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP301/problems/MEANMEDIAN