DCP-28: Circle and Square Back to All Problems

Beginner Geometry > Basic Geometry

In this problem you have to do some basic school geometry problem solution. You will be given radius of a circle (**R**) and side of a square (**S**). You have to write a program to determine whether the square will perfectly fit inside the circle or not. Please check the following picture to get an understanding. ![circle and square][1] Input: ------ First line of the input will consist of an integer which represent the test case **T (0 &lt; T<=30)**. Each test case contains 2 positive fraction numbers R denoting the radius of the circle and S denoting the side of the square. You can assume **(0.00 &lt; R, S <=100.00)**. Output: ------- For each test case print **Yes** if the square will perfectly fit inside the circle, otherwise print **No**. Please consider only 2 decimal places in the final comparison for decision making. Sample Input ------------ 3 30.00 42.43 20.00 30.00 1.00 5.00 Sample Output ------------- Yes No No [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/ab482c79-3818-c984-3ad0-08d2e28a520e_d686ac6d0a9b4df593e7cc4c5d6dc948_W225xH225.png

Problem Setter:

MD. Jalal Uddin

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C/C++ 1.00
Java 2.00
C# 2.00
PHP 2.00

Problem Stats




# User Language Timing
01 absa1am Cpp 0.00s
02 emrul Cpp 0.00s
03 mahrahat Cpp 0.00s
04 I_See_You Cpp 0.00s
05 PKP_007 Cpp 0.00s
06 maxhasan Cpp 0.00s
07 golapraj Cpp 0.00s
08 rabib Cpp 0.00s
09 jayed_al_hasan Cpp 0.00s
10 ishrafislam2727 Cpp 0.00s
11 subhashis_cse Cpp 0.00s
12 ronok_cse Cpp 0.00s
13 Kira Cpp 0.00s
14 terminator_c Cpp 0.00s
15 ssavi Cpp 0.01s
16 lazyfahim Cpp 0.01s
17 iamramzan Cpp 0.07s
18 Sheikh_Fahad Cpp 0.08s
19 rayhan50001 Cpp 0.08s
20 anis Cpp 0.08s
21 leenaiitju Cpp 0.08s
22 shahbaz Cpp 0.08s
23 laziestcoder Cpp 0.08s
24 MinhajulAlam Cpp 0.08s
25 Dinar Cpp 0.08s
26 sourovsrv Cpp 0.08s
27 sohag_AUST Cpp 0.09s
28 imran16 Cpp 0.09s
29 chinmoysaha Cpp 0.09s
30 haasib Cpp 0.09s
31 marineCoder Cpp 0.09s
32 kamrulislam95 Cpp 0.19s
33 Pankaj Cpp 0.19s
34 Ashish_Deb Cpp 0.20s
35 sk_roy Cpp 0.22s
36 RakibR3 Cpp 0.23s
37 ih_hira Cpp 0.23s
38 jualahmed Cpp 0.27s
39 mahbub07 Cpp 0.31s
40 showmic Cpp 0.39s
41 tariqiitju Cpp 0.39s
42 Brokenlog Cpp 0.40s
43 TrustIsEveryThing Cpp 0.40s
44 rash29 Cpp 0.47s
45 Sabyasachi Cpp 0.48s
46 mdtameemkhan Cpp 0.48s
47 Sakib2033 Cpp 0.48s
48 njrafi Cpp 0.48s
49 MyBD Cpp 0.49s
50 mahimulasad Java 1.50s

Your feedback is our precious!

Or call +88 02 9853138 for support