Yahoo India Web Search

Search results

      • Just count all students with arrival time <= 0. Solution: #!/usr/bin/py if__name__=='__main__':t=input()for_inxrange(t):n,m=map(int,raw_input().split())A=map(int,raw_input().split())forxinA:ifx<=0:m-=1ifm<=0:print"NO"else:print"YES"
      martinkysel.com/hackerrank-angry-professor-solution/
  1. People also ask

  2. Jul 31, 2024 · In this HackerRank Angry Professor problem you have Given the arrival time of each student and a threshold number of attendees, determine if the class is canceled. Problem solution in Python programming.

  3. May 8, 2020 · ⭐️ Content Description ⭐️In this video, I have explained on how to solve angry professor problem by using simple loop and conditions in python. This hackerra...

    • Task
    • Input Format
    • Constraints
    • Solution – Angry Professor

    A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time (arrivalTime <= 0) to arrived late (arrivalTime > 0). Given the arrival time of each student and a threshhold num...

    The first line of input contains t, the number of test cases. Each test case consists of two lines. The first line has two space-separated integers, n and k, the number of students (size of a) and the cancellation threshold. The second line contains n space-separated integers (a, a, . . . ,a[n]) that describe the arrival times for each student.

    1 <= t<= 10
    1 <= n<= 1000
    1 <= k <=n
    -100 <= a[i] <= 100, where i belongs to [1, . . . ,n]

    Java

    Disclaimer: The above Problem (Angry Professor) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and LearningPurpose.

  4. Mar 6, 2023 · Hackerrank Angry Professor Solutions. # solution # hackerrank # python. A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor. decides to cancel class if fewer than some number of students are present when class starts. Arrival times go.

  5. Jun 20, 2020 · Solution in python def angryProfessor(k, a): s = 0 for i in a: if i<1: s+=1 return "YES" if s<k else "NO" for _ in range(int(input())): n,k = map(int,input().split()) a = map(int,input().split()) print(angryProfessor(k, a))

  6. Jul 21, 2020 · we solve the hackerrank angry professor challenges using python (if else condition)..link for challenge: https://www.hackerrank.com/challenges/angry-professo...

    • 11 min
    • 166
    • Dulal Sandip
  7. www.hackerrank.com › challenges › angry-professorAngry Professor | HackerRank

    Topics. A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time () to arrived late ( ).