import java.io.*;
import java.math.BigInteger;
import java.util.StringTokenizer;
class Scan {
BufferedReader buffer;
StringTokenizer tok;
Scan() {
buffer = new BufferedReader(new InputStreamReader(System.in));
}
boolean hasNext() {
while (tok == null || !tok.hasMoreElements()) {
try {
tok = new StringTokenizer(buffer.readLine());
} catch (Exception e) {
return false;
}
}
return true;
}
String next() {
if (hasNext())
return tok.nextToken();
return null;
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
}
public class Main {
public static void main(String[] args) {
PrintWriter out = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(System.out)));
Scan scan = new Scan();
int T,R;
T=scan.nextInt();
for(R=1;R<=T;R++)
{
long n;
n=scan.nextLong();
BigInteger eight = BigInteger.valueOf(8);
BigInteger seven = BigInteger.valueOf(7);
BigInteger one = BigInteger.valueOf(1);
BigInteger N = BigInteger.valueOf(n);
BigInteger ans ;
ans = N.multiply(N).multiply(eight).subtract(N.multiply(seven)).add(one);
out.println("Case #"+R+": "+ans);
}
out.flush();
}
}
hdu 5047 java快速输入输出
最新推荐文章于 2019-01-21 13:26:51 发布