OJ在线编程常见输入输出练习

javascrv8篇:

1.计算a+b

输入描述:

输入包括两个正整数a,b(1 <= a, b <= 1000),输入数据包括多组。

输出描述:

输出a+b的结果

输入例子1:

1 5
10 20

输出例子1:

6
30
let line;
while(line=readline()){
    let linearr=line.split(" ");
    let res=0;
    for(let i=0;i<linearr.length;i++){
        res+=parseInt(linearr[i]);
    }
    print(res);
}

若输入改为:

输入例子1:

2
1 5
10 20

输出例子1:

6
30
let n=parseInt(readline());
while(n--){
    let line=readline();
    let linearr=line.split(' ');
    let res=0;
    for(let i=0;i<linearr.length;i++){
        res+=parseInt(linearr[i]);
    }
    print(res);
}

待补充....

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
leetcode 和 oj CCP(编码实践集) 这是一个在线编程实践的集合。 有几个网站提供在线判断,有的提供问题列表,有的只提供结果判断。 在线资源列表 网站 奥杰 RJ 实践 挑战 采访 语言 :cross_mark: :cross_mark: :cross_mark: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: :cross_mark: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :cross_mark: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :cross_mark: :hollow_red_circle: C、C++、Java、Python 等。 :cross_mark: :hollow_red_circle: :hollow_red_circle: :cross_mark: :cross_mark: C、C++、Java、Python 等。 :cross_mark: :cross_mark: :hollow_red_circle: :cross_mark: :cross_mark: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :hollow_red_circle: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python 等。 :hollow_red_circle: :cross_mark: :cross_mark: :hollow_red_circle: :hollow_red_circle: C、C++、Java、Python

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值