http://ace.delos.com/usacogate
帐号:helihui1
题目提交样例
帐号的id我的是:7758
PROGRAM NAME: test //题目会有这么一句
/*
ID: your_id_here
PROG: test //修改
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
ofstream fout ("test.out"); //test.out 在题目里说明是什么的
ifstream fin ("test.in"); //同上
int a, b;
fin >> a >> b;
fout << a+b << endl;
return 0;
}
/*
ID: your_id_here
LANG: C
TASK: test
*/
#include <stdio.h>
main () {
FILE *fin = fopen ("test.in", "r");
FILE *fout = fopen ("test.out", "w");
int a, b;
fscanf (fin, "%d %d", &a, &b); /* the two input integers */
fprintf (fout, "%d/n", a+b);
exit (0);
}