My issue
iam getting error even though i feel my code is correct
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t>0){
int a=sc.nextInt();
int b=sc.nextInt();
int n=sc.nextInt();
int res=n%3;
if(res==0){
System.out.println(a);
}
else if(res==1){
System.out.println(b);
}
else{
System.out.println(a^b);
}
t--;
}
sc.close();
}
}
Problem Link: Special Fibonacci Practice Coding Problem