【IO输入挂】

7 篇文章 0 订阅
3 篇文章 0 订阅

【C++正整数】

inline int in()//快速读入
{
	int ch,ans;
	ch = getchar();
	if (-1 == ch) return -1;//读取EOF
	while(ch < '0' || '9' < ch) ch = getchar();
	ans = ch-'0';
	while((ch = getchar()) >= '0' && '9' >= ch) ans = (ans<<3)+(ans<<1)+ch-'0';
	return ans;
}


 

【C++正负整数】

inline int in()
{
	int f = 1, ans, ch;
	while((ch = getchar()) < '0' || ch > '9') if('-' == ch) {ch = getchar(),f = -1; break;}
	ans = ch-'0';
	while((ch = getchar()) >= '0' && ch <= '9') ans = (ans<<3)+(ans<<1)+ch-'0';
	return f*ans;
}

 

【JAVA输入hdu5047】

import java.math.BigInteger;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.FileWriter;
class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    public static void main(String []args) throws Exception{
        int TC = Integer.parseInt(in.readLine());
        int T = 0;
        while (TC-- > 0) {
            T++;
            out.write("Case #" + T + ": ");
            BigInteger N = new BigInteger(in.readLine());
            BigInteger e = BigInteger.valueOf(8);
            BigInteger s = BigInteger.valueOf(7);
            BigInteger rlt = N.multiply(N).multiply(e).subtract(N.multiply(s)).add(BigInteger.ONE);
            out.write(rlt.toString());
            out.newLine();
        }
        out.flush();
    }
}



 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值