• Observation: Here if Peter says “YES” then it does not matter what is the answer of others. But if Peter says “NO” then we need to check maximum what maximum people say among others of them.

  • Solution Idea:  Here we need to use if-else to check their answer. At first, we need to check Peter's answer whether he says yes or no. if he says yes then we can print “YES” otherwise we need to check if the maximum person says yes or no if the maximum person says yes then we can print “YES” otherwise we can print “NO”.

Statistics

83% Solution Ratio
abu_fayeemEarliest, Mar '22
sodiumfis_hFastest, 0.0s
abu_fayeemLightest, 131 kB
Marzuq01Shortest, 125B
Toph uses cookies. By continuing you agree to our Cookie Policy.