import java.io.*;
import java.math.*;
public class Main{
public static BufferedReader cin=new BufferedReader(new InputStreamReader(System.in));
public static BufferedWriter cout=new BufferedWriter(new OutputStreamWriter(System.out));
public static void main(String []args) throws Exception{
int T=Integer.parseInt(cin.readLine());
for(int nkase=1;nkase<=T;nkase++){
cout.write("Case #"+nkase+": ");
BigInteger N=new BigInteger(cin.readLine());
BigInteger ans=N.multiply(N).multiply(BigInteger.valueOf(8)).subtract(N.multiply(BigInteger.valueOf(7))).add(BigInteger.valueOf(1));
cout.write(ans.toString());
cout.newLine();
}
cout.flush();
cout.close();
}
}
java 的高效读写
最新推荐文章于 2021-12-31 11:23:18 发布