Submission #164285

#TimeUsernameProblemLanguageResultExecution timeMemory
164285daddy0h일차 함수 (tutorial4)C++11
Compilation error
0 ms0 KiB
/// https://oj.uz/problem/view/tutorial4 /// f(x) = ax + b; /// -10^2 <= x <= 10^2 /// -10^5 <= a, b <= 10^5 #include <bits/stdc++.h> #include "grader.h" using namespace std; #include "grader.h" void solve() { int x1 = 0; int b = f(x1); int a; int x2 = 1; int a = f(x2) - b; Report(a, b); }

Compilation message (stderr)

tutorial4.cpp: In function 'void solve()':
tutorial4.cpp:19:6: error: redeclaration of 'int a'
  int a = f(x2) - b;
      ^
tutorial4.cpp:17:6: note: 'int a' previously declared here
  int a;
      ^