/ SeriousOJ /

Record Detail

Compile Error

foo.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> a >> b;
      |         ^~~
      |         std::cin
In file included from foo.cc:1:
/usr/include/c++/13/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
foo.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << a-b;
      |         ^~~~
      |         std::cout
/usr/include/c++/13/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~

Code

#include <iostream>
using namespase std;

int main()
{
    int a, b;
	cin >> a >> b;
	cout << a-b;
}

Information

Submit By
Type
Submission
Problem
P1226 Event Registration
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-02 15:42:50
Judged At
2025-09-02 15:42:50
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes