제출 #1156046

#제출 시각아이디문제언어결과실행 시간메모리
1156046fingolfin42A + B (IOI24_aplusb)C++20
컴파일 에러
0 ms0 KiB
#include <iostream>
using namespace std;
int sum(int a, int b){
  return a+b;
}
int main(){
  ios::sync_with_stdio(false); cin.tie(NULL);
  int a, b;
  cin >> a >> b;
  cout << sum(a, b) << endl;
  return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccjffM6L.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccaCKkHU.o:aplusb.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status