Created
March 8, 2023 12:32
-
-
Save modos/eade0243d5025b6310b45640a2067f62 to your computer and use it in GitHub Desktop.
Donuts and the Giant Pizza
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int tc; | |
cin >> tc; | |
while (tc--) | |
{ | |
int r, w, h; | |
cin >> r >> w >> h; | |
if (w * w + h * h <= 4 * r * r) | |
cout << "Pizza fits on the table.\n"; | |
else | |
cout << "Pizza does not fit on the table.\n"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment