class Solution {
public:
vector<int> numOfBurgers(int ts, int cs) {
vector<int> a;
if(ts%2==1||ts>4*cs||ts<2*cs)
{
return a;
}
int p=ts/2;
int tu=p-cs;
int du=cs-tu;
a.push_back(tu);
a.push_back(du);
return a;
}
};
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter