Loading...
Submission
Id When Author Problem Language CPU Memory Verdict
16858 2024-04-19 13:44:10 dnt Max Number Java 201 ms 47296 kb Accepted
Test Cases
CPU Memory Verdict
1 102 ms 38732 kb Accepted
2 104 ms 42396 kb Accepted
3 107 ms 42092 kb Accepted
4 105 ms 42228 kb Accepted
5 101 ms 38928 kb Accepted
6 102 ms 38220 kb Accepted
7 201 ms 47296 kb Accepted
Source Code
program.java
Download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. int testCases = sc.nextInt(); // Read the number of test cases
  7.  
  8. for (int i = 0; i < testCases; i++) {
  9. int a = sc.nextInt(); // Read the first number
  10. int b = sc.nextInt(); // Read the second number
  11. int c = sc.nextInt(); // Read the third number
  12.  
  13. // Find the maximum among a, b, and c
  14. int max = Math.max(a, Math.max(b, c));
  15.  
  16. System.out.println(max); // Output the maximum
  17. }
  18. }
  19. }
  20.