Number of open doors | TCS Coding Question | package whatever do not write package name here ; Function that counts the number of doors opens after the Nth turn ; Find the number of open doors ; Return the resultant count of open doors ; Driver Code
import java . io . * ; class GFG { static int countOpenDoors ( int N ) { int doorsOpen = ( int ) Math . sqrt ( N ) ; return doorsOpen ; } public static void main ( String [ ] args ) { int N = 100 ; System . out . println ( countOpenDoors ( N ) ) ; } }