首页
社区
课程
招聘
[求助]一個浙江大學OJ上遇到的 問題
发表于: 2007-7-3 15:30 5240

[求助]一個浙江大學OJ上遇到的 問題

2007-7-3 15:30
5240
特地找了個看上去最簡單的問題...

要求:

Input
The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.

我的代碼:

#include <iostream>
using namespace std;

int main()
{
        int a;
        int b;
        long c;
       
        while(cin >> a >> b)
        {
                c = a + b;
                cout << c << endl;
        }
}

提交上去提示:Presentation Error
我語言用的是C++

不 清楚是怎麼錯誤...
能幫個忙嗎?

謝謝

[培训]科锐逆向工程师培训第53期2025年7月8日开班!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 519
活跃值: (1223)
能力值: ( LV12,RANK:650 )
在线值:
发帖
回帖
粉丝
2
你确定? 我把你的代码拷贝粘贴过去是Accept的...

btw, Presentation Error是指格式错误,多了或者少了空格回车什么的
2007-7-3 19:41
0
雪    币: 210
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3




謝謝

那我繼續了

^_^
2007-7-4 11:12
0
游客
登录 | 注册 方可回帖
返回