Connection Status:
Competition Arena > BiggestPaycheck
2022 HF Qual · 2022-03-16 · by t-mac · Simple Math
Class Name: BiggestPaycheck
Return Type: int
Method Name: findBiggest
Arg Types: (int, int, int)
Problem Statement

Problem Statement

Your friend just asked your what is the biggest paycheck you have ever received. Since you have only been working for a few weeks, it is easy for you to figure this out. The value of your paychecks is given in ints a, b, and c. Return the value of the largest of your paychecks.

Constraints

  • a, b, and c will each be between 1 and 1000, inclusive.
Examples
0)
50
55
60
Returns: 60

Looks like you've done better as time goes on. 60 is your biggest paycheck so far.

1)
999
1
2
Returns: 999

You almost have to wonder if payroll made an error the first week.

2)
50
50
10
Returns: 50

Doesn't really matter if two are tied for biggest, as it doesn't change your answer.

3)
987
654
321
Returns: 987
4)
12
34
567
Returns: 567

Submissions are judged against all 62 archived test cases, of which 5 are shown here. Case numbers match the judge’s.

Coding Area

Language: C++17 · define a public class BiggestPaycheck with a public method int findBiggest(int a, int b, int c) · 62 test cases · 2 s / 256 MB per case

Submitting as anonymous