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

137/447

Solve/Submission

Ranking

# 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 Kira Cpp 0.00s
11 terminator_c Cpp 0.00s
12 Iqbal1013 Cpp 0.00s
13 gulzar Cpp 0.00s
14 Mhkhaled Cpp 0.00s
15 ash12 Cpp 0.00s
16 sadia2427 Cpp 0.00s
17 joy25896 Cpp 0.00s
18 Khayrul_34 Cpp 0.00s
19 Nazmul0092 Cpp 0.00s
20 gsshanto Cpp 0.00s
21 rakibmahmud Cpp 0.00s
22 ishrafislam2727 Cpp 0.00s
23 subhashis_cse Cpp 0.00s
24 ronok_cse Cpp 0.00s
25 serious_sam Cpp 0.00s
26 nazmul_bzs Cpp 0.00s
27 onucsecu Cpp 0.00s
28 ssavi Cpp 0.01s
29 Snails Cpp 0.01s
30 lazyfahim Cpp 0.01s
31 mhsjaber CSharp 0.03s
32 iamramzan Cpp 0.07s
33 Sheikh_Fahad Cpp 0.08s
34 rayhan50001 Cpp 0.08s
35 anis Cpp 0.08s
36 leenaiitju Cpp 0.08s
37 shahbaz Cpp 0.08s
38 laziestcoder Cpp 0.08s
39 MinhajulAlam Cpp 0.08s
40 Dinar Cpp 0.08s
41 sourovsrv Cpp 0.08s
42 sohag_AUST Cpp 0.09s
43 imran16 Cpp 0.09s
44 chinmoysaha Cpp 0.09s
45 haasib Cpp 0.09s
46 marineCoder Cpp 0.09s
47 kamrulislam95 Cpp 0.19s
48 Pankaj Cpp 0.19s
49 Ashish_Deb Cpp 0.20s
50 sk_roy Cpp 0.22s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support