Wrong Answer
Code
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0) {
int N = sc.nextInt();
int[] arr = new int[N];
int odd = 0, even = 0;
for(int i=0; i<N; i++) {
arr[i] = sc.nextInt();
if(arr[i]%2 == 0) {
even++;
}else {
odd++;
}
}
if(odd%2 == 1 || (even==0 && odd>0)) {
System.out.println("Roy");
}else {
System.out.println("Hridoy");
}
}
sc.close();
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1102 Odd-Even Game
- Contest
- Brain Booster #6
- Language
- Java 8 (OpenJDK 1.8.0_422)
- Submit At
- 2024-10-03 17:49:19
- Judged At
- 2024-11-11 02:45:33
- Judged By
- Score
- 0
- Total Time
- 758ms
- Peak Memory
- 52.844 MiB