https://nanti.jisuanke.com/t/A2020
% java
package test;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static boolean judge(BigInteger a)
{
if(a.equals(BigInteger.ZERO))return true;
BigInteger l = BigInteger.ONE,r = a,mid;
while(l.compareTo(r) <= 0)
{
mid = l.add(r).shiftRight(1);
BigInteger tmp = mid.multiply(mid);
if(tmp.equals(a))
{
return true;
}
else if(tmp.compareTo(a) > 0)
{
r = mid.subtract(BigInteger.ONE);
}
else if(tmp.compareTo(a) < 0)
{
l = mid.add(BigInteger.ONE);
}
}
return false;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n;
n = scanner.nextInt();
for(int i = 1; i <= n; i ++)
{
BigInteger two = BigInteger.valueOf(2);
BigInteger a;
a = scanner.nextBigInteger();
BigInteger en = a.multiply(a.subtract(BigInteger.ONE)).divide(two);
boolean b1 = judge(a),e1 = judge(en);
if(b1 && e1)
{
System.out.println("Arena of Valor");
}
else if(b1 && !e1){
System.out.println("Hearth Stone");
}
else if(!b1 && e1){
System.out.println("Clash Royale");
}
else{
System.out.println("League of Legends");
}
}
}
}