• Study Materials – Company wise
    • Infosys Archive
    • Accenture Archive
    • AMCAT Archive
    • Capgemini Archive
    • Cisco Archive
    • CoCubes Archive
    • Cognizant(CTS) Archive
    • Dell Archive
    • Deloitte Archive
    • DXC Archive
    • Goldman Sachs Archive
    • Hexaware Technologies Archive
    • LTI Archive
    • MindTree Archive
    • TCS Archive
    • Virtusa Archive
    • Wipro Archive
  • Interview Preparation – E Books
    • C Interview Questions
    • Data Structures Interview Questions
    • DBMS Interview Questions
    • HR Interview Questions
    • Java Interview Questions
    • Operating System Interview Questions
    • Python Interview Questions
    • SQL Query Interview Questions
  • Programming
    • C Programming MCQs
    • C Code Snippets – Output Questions
    • Python Code Snippets – Output Questions
  • Aptitude
    • Verbal Ability for Placements
    • Quant for Placements
  • Register
  • Login
CODE OF GEEKS

We at CODE OF GEEKS, aim at providing best and quality content for our users at no extra cost.

    • Study Materials – Company wise
      • Infosys Archive
      • Accenture Archive
      • AMCAT Archive
      • Capgemini Archive
      • Cisco Archive
      • CoCubes Archive
      • Cognizant(CTS) Archive
      • Dell Archive
      • Deloitte Archive
      • DXC Archive
      • Goldman Sachs Archive
      • Hexaware Technologies Archive
      • LTI Archive
      • MindTree Archive
      • TCS Archive
      • Virtusa Archive
      • Wipro Archive
    • Interview Preparation – E Books
      • C Interview Questions
      • Data Structures Interview Questions
      • DBMS Interview Questions
      • HR Interview Questions
      • Java Interview Questions
      • Operating System Interview Questions
      • Python Interview Questions
      • SQL Query Interview Questions
    • Programming
      • C Programming MCQs
      • C Code Snippets – Output Questions
      • Python Code Snippets – Output Questions
    • Aptitude
      • Verbal Ability for Placements
      • Quant for Placements
    • Register
    • Login
  • [email protected]
  • ..
Login / Register
Apply Now
CODE OF GEEKS
CODE OF GEEKS
  • Study Materials – Company wise
    • Infosys Archive
    • Accenture Archive
    • AMCAT Archive
    • Capgemini Archive
    • Cisco Archive
    • CoCubes Archive
    • Cognizant(CTS) Archive
    • Dell Archive
    • Deloitte Archive
    • DXC Archive
    • Goldman Sachs Archive
    • Hexaware Technologies Archive
    • LTI Archive
    • MindTree Archive
    • TCS Archive
    • Virtusa Archive
    • Wipro Archive
  • Interview Preparation – E Books
    • C Interview Questions
    • Data Structures Interview Questions
    • DBMS Interview Questions
    • HR Interview Questions
    • Java Interview Questions
    • Operating System Interview Questions
    • Python Interview Questions
    • SQL Query Interview Questions
  • Programming
    • C Programming MCQs
    • C Code Snippets – Output Questions
    • Python Code Snippets – Output Questions
  • Aptitude
    • Verbal Ability for Placements
    • Quant for Placements
  • Register
  • Login
0

Cart

Class Students

  • March 1, 2020
  • CODE OF GEEKS
  • 4


Dia, Sam, and Robert are the three students of a same class. You know their marks in ‘N’ subjects. Your job is to find their ranks according to their score.

Input

N, integer denoting number of subjects.
3 array of integers, denoting marks of Dia, Sam and Robert respectively in N subjects.

Output

Ranks



Example

Input

3
23 34 23
32 53 23
55 22 67

Output

3 2 1

Tags: hack with infy coding questionshackwithinfy coding problemshackwithinfy coding questions
  • Previous InfyTQ Screening Test Experience 2020 – 1
  • Next Distinct Substrings

4 comments on “Class Students”

  1. User says:
    March 2, 2020 at 1:10 pm

    It’ll s better if you can please display in which round the prob. is asked , that’ll help us in better way , since we’re overhyped about the difficulty level.
    Thankyou

    Reply
    1. Prafull Jain says:
      March 14, 2020 at 2:22 pm

      it would be a big help if you can do so.

      Reply
  2. Venkata Nikhil Chakravarthy K says:
    May 5, 2021 at 12:56 pm

    n = int(input())
    inp = []
    for i in range(n):
    nos = list(map(int, input().split()))
    inp.append(nos)

    res = []
    for i in inp:
    res.append(sum(i))

    print(res)

    for i in range(n):
    if res[i] == min(res):
    res[i] = 3
    elif res[i] == max(res):
    res[i] = 1
    else:
    res[i] = 2

    res = [str(i) for i in res]
    print(” “.join(res))

    Reply
  3. poovitha says:
    May 6, 2021 at 5:17 am

    n=int(input())
    a=list(map(int,input().split()))
    b=list(map(int,input().split()))
    c=list(map(int,input().split()))
    d=sum(a)
    e=sum(b)
    f=sum(c)
    h=[d,e,f]
    g=[]
    for i in h:
    if i is max(h):
    g.append(1)
    elif i is min(h):
    g.append(3)
    else:
    g.append(2)
    print(g)

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CODE OF GEEKS

Subscribe to Newsletter

CODE OF GEEKS

Learn | Code | Achieve

Reach us

[email protected]
We at CODE OF GEEKS, aim at providing quality content to our users at no cost.
CODE OF GEEKS

Important Pages

About us
Advertise
Privacy Policy
Terms and Conditions

Placements – Study Materials

TCS NQT     Wipro     CapGemini
Accenture     MindTree     CTS
DXC     Hexaware Technologies     AMCAT
CoCubes     Goldman Sachs     Dell
Cisco     Deloitte     Virtusa     LTI     Infosys   

Courses

  • Mail Us
  • Login/Register

Recent Posts

TCS Reasoning 2021
  • October 4, 2021
TCS Verbal 2021
  • October 4, 2021

Copyright 2021 CODE OF GEEKS. All Rights Reserved.

  • →