alexjercan/bugnet huggingface dataset:
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[]) {
  int a, b, ans;
  char op;
  while (true) {
    cin >> a >> op >> b;
    if (op == '?') {
      break;
    }

    if (op == '+') {
      ans = a + b;
    } else if (op == '-') {
      ans = a - b;
    } else if (op == '*') {
      ans = a * b;
    } else if (op == '/') {
      ans = a / b;
    }
    cout << ans << endl;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[]) {
  int a, b, ans;
  char op;
  cin >> a >> op >> b;
  while (true) {
    if (op == '?') {
      break;
    }

    if (op == '+') {
      ans = a + b;
    } else if (op == '-') {
      ans = a - b;
    } else if (op == '*') {
      ans = a * b;
    } else if (op == '/') {
      ans = a / b;
    }
    cout << ans << endl;
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

int main(int argc, char **argv) {
  int x, y;
  char op;

  bool hasEnd = false;

  while (!hasEnd) {
    int result;
    cin >> x >> op >> y;
    switch (op) {
    case '+':
      result = x + y;
      break;
    case '-':
      result = x - y;
      break;
    case '*':
      result = x * y;
      break;
    case '/':
      result = x / y;
      break;
    case '?':
      hasEnd = true;
      break;
    }
    if (!hasEnd) {
      cout << result << endl;
    }
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

int main(int argc, char **argv) {
  int x, y;
  char op;
  cin >> x >> op >> y;

  bool hasEnd = false;

  while (!hasEnd) {
    int result;
    switch (op) {
    case '+':
      result = x + y;
      break;
    case '-':
      result = x - y;
      break;
    case '*':
      result = x * y;
      break;
    case '/':
      result = x / y;
      break;
    case '?':
      hasEnd = true;
      break;
    }
    if (!hasEnd)
      cout << result << endl;
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <cstdio>
#include <iostream>

using namespace std;

int main() {
  int a, c;
  char b;
  while (1) {
    cin >> a >> b >> c;
    if (b == '?')
      break;
    if (b == '+')
      cout << a + c;
    else if (b == '-')
      cout << a - c;
    else if (b == '*')
      cout << a * c;
    else
      cout << a / c;
    cout << endl;
  }
}


Error: -8

Fixed submission:

#include <cstdio>
#include <iostream>

using namespace std;

int main() {
  int a, b, c;
  while (1) {
    cin >> a >> b >> c;
    if (b == '?')
      break;
    if (b == '+')
      cout << a + b;
    else if (b == '-')
      cout << a - b;
    else if (b == '*')
      cout << a * b;
    else
      cout << a / b;
    cout << endl;
  }
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <cstdio>
using namespace std;

int main() {
  while (1) {
    int a, b, value;
    char op;
    scanf("%d %c %d", &a, &op, &b);
    switch (op) {
    case '+':
      value = a + b;
      break;
    case '-':
      value = a - b;
      break;
    case '*':
      value = a * b;
      break;
    case '/':
      value = a / b;
      break;
    case '?':
      return 0;
    }
    printf("%d\\n", value);
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <cstdio>

using namespace std;

int main() {
  while (true) {
    int a, b;
    char op;
    scanf("&d %c %d", &a, &op, &b);
    switch (op) {
    case '+':
      printf("%d\\n", a + b);
      break;
    case '-':
      printf("%d\\n", a - b);
      break;
    case '*':
      printf("%d\\n", a * b);
      break;
    case '/':
      printf("%d\\n", a / b);
      break;
    case '?':
      return 0;
    }
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main() {
  int a, b;
  char op;
  int answer;
  for (;;) {
    cin >> a >> op >> b;
    switch (op) {
    case '+':
      answer = a + b;
      break;
    case '-':
      answer = a - b;
      break;
    case '*':
      answer = a * b;
      break;
    case '/':
      answer = a / b;
      break;
    }
    if (op == '?')
      break;
    cout << answer << endl;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  int a, b, op, ans;
  while (1) {
    cin >> a >> op >> b;
    switch (op) {
    case '+':
      ans = a + b;
      break;
    case '-':
      ans = a - b;
      break;
    case '*':
      ans = a * b;
      break;
    case '/':
      ans = a / b;
      break;
    }
    if (op == '?')
      break;
    cout << ans << endl;
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;

int main() {
  int a, b;
  string op;

  while (1) {
    cin >> a >> op >> b;
    if (op == "+") {
      cout << a + b << endl;
    } else if (op == "-") {
      cout << a - b << endl;
    } else if (op == "*") {
      cout << a * b << endl;
    } else if (op == "/") {
      cout << a / b << endl;
    }
    if (op == "?")
      break;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  int a, b;
  string op;

  cin >> a >> op >> b;

  while (1) {
    if (op == "?") {
      break;
    } else if (op == "+") {
      cout << a + b << endl;
    } else if (op == "-") {
      cout << a - b << endl;
    } else if (op == "*") {
      cout << a * b << endl;
    } else if (op == "/") {
      cout << a / b << endl;
    }
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>

using namespace std;

int main() {

  int x, y;
  string str;

  while (true) {
    cin >> x >> str >> y;

    if (str == "?")
      break;
    if (str == "+")
      cout << x + y << endl;
    if (str == "-")
      cout << x - y << endl;
    if (str == "*")
      cout << x * y << endl;
    if (str == "/")
      cout << x / y << endl;
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>

using namespace std;

int main() {

  int x, y;
  string str;

  while (true) {
    cin >> x >> y;
    cin >> str;

    if (str == "?")
      break;

    if (str == "+")
      cout << x + y << endl;
    if (str == "-")
      cout << x - y << endl;
    if (str == "*")
      cout << x * y << endl;
    if (str == "/")
      cout << x / y << endl;
  }
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
using namespace std;

int main(void) {
  int a, b;
  char op = '0';

  while (op != '?') {
    cin >> a >> op >> b;

    if (op == '+') {
      cout << a + b << endl;
    } else if (op == '-') {
      cout << a - b << endl;
    } else if (op == '*') {
      cout << a * b << endl;
    } else if (op == '/') {
      cout << a / b << endl;
    }
  }

  return 0;
}

Error: -8

Fixed submission:

#include <iostream>
using namespace std;

int main(void) {
  int a, b;
  char op = '0';

  while (op != '?') {
    cin >> a >> op >> b;

    if (op == '+') {
      cout << a + b << endl;
    } else if (op == '-') {
      cout << a - b << endl;
    } else if (op == '*') {
      cout << a * b << endl;
    } else {
      cout << a / b << endl;
    }
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <stdio.h>
int main() {
  int a, b;
  char op;
  while (op != '?') {
    scanf("%d %c %d", &a, &op, &b);
    if (op == '+') {
      printf("%d\\n", a + b);
    }
    if (op == '-') {
      printf("%d\\n", a - b);
    }
    if (op == '*') {
      printf("%d\\n", a * b);
    }
    if (op == '/') {
      printf("%d\\n", a / b);
    }
  }
  return 0;
}

Error: -8

Fixed submission:

#include <stdio.h>
int main() {
  int a, b;
  char op;
  while (op != '?') {
    scanf("%d %c %d", &a, &op, &b);
    if (op = '+') {
      printf("%d\\n", a + b);
    }
    if (op = '-') {
      printf("%d\\n", a - b);
    }
    if (op = '*') {
      printf("%d\\n", a * b);
    }
    if (op = '/') {
      printf("%d\\n", a / b);
    }
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <cstdio>
#include <iostream>
using namespace std;

#define MAX 20000

int main(void) {
  int a, b, flag = 0;
  char op;
  while (1) {
    do {
      cin >> a >> op >> b;
    } while (a < 0 || a > MAX || b < 0 ||
             b > MAX && op != '+' && op != '-' && op != '*' && op != '/' &&
                 op != '?');

    switch (op) {
    case '+':
      printf("%d\\n", a + b);
      break;
    case '-':
      printf("%d\\n", a - b);
      break;
    case '*':
      printf("%d\\n", a * b);
      break;
    case '/':
      printf("%d\\n", a / b);
      if (b == 0)
        break;
      break;
    case '?':
      flag = 1;
      break;
    }
    if (flag == 1)
      break;
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <cstdio>
#include <iostream>
using namespace std;

#define MAX 20000

int main(void) {
  int a, b, flag = 0;
  char op;
  while (1) {
    do {
      cin >> a >> op >> b;
    } while (a < 0 || a > MAX || b < 0 ||
             b > MAX && op != '+' && op != '-' && op != '*' && op != '/' &&
                 op != '?');

    switch (op) {
    case '+':
      printf("%d\\n", a + b);
      break;
    case '-':
      printf("%d\\n", a - b);
      break;
    case '*':
      printf("%d\\n", a * b);
      break;
    case '/':
      printf("%d\\n", a / b);
      if (b == 0)
        break;
      break;
    case '?':
      if (a == 0 && b == 0)
        flag = 1;
      break;
    }
    if (flag == 1)
      break;
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
// #define shosu(n) setprecision(n)
// #define ENDL endl
using namespace std;
int main() {
  int A, B;
  char s;
  while (cin >> A >> s >> B) {
    if (s == '?')
      break;
    if (s == '+')
      cout << A + B << endl;
    if (s == '-')
      cout << A - B << endl;
    if (s == '*')
      cout << A * B << endl;
    if (s == '/')
      cout << A / B << endl;
  }
  return 0;
}

Error: 9

Fixed submission:

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
// #define shosu(n) setprecision(n)
// #define ENDL endl
using namespace std;
int main() {
  int A, B;
  char s;
  while (cin >> A >> s >> B) {
    if (s == '?')
      break;
    if (s == '+')
      cout << A + B << endl;
    if (s == '-')
      cout << A - B << endl;
    if (s == '*')
      cout << A * B << endl;
    if (s == '/')
      cout << A / B << endl;
  }
  return 9;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
  while (1) {
    int x, y;
    char c;
    cin >> x >> c >> y;

    if (c == '?')
      break;
    int z;
    switch (c) {
    case '+':
      z = x + y;
      break;
    case '-':
      z = x - y;
      break;
    case '*':
      z = x * y;
      break;
    case '/':
      z = x / y;
      break;
    case '%':
      z = x % y;
      break;
    }
    printf("%d\\n", z);
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  while (1) {
    int x, y;
    char c;
    cin >> x >> y >> c;

    if (c == '?')
      break;
    int z;
    switch (c) {
    case '+':
      z = x + y;
      break;
    case '-':
      z = x - y;
      break;
    case '*':
      z = x * y;
      break;
    case '/':
      z = x / y;
      break;
    case '%':
      z = x % y;
      break;
    }
    cout << "\\n" << z;
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
using namespace std;
int main() {
  int a, b;
  char op;
  cin >> a >> op >> b;
  while (op != '?') {
    if (op == '+') {
      cout << a + b << endl;
    } else if (op == '-') {
      cout << a - b << endl;
    } else if (op == '*') {
      cout << a * b << endl;
    } else if (op == '/') {
      cout << a / b << endl;
    }
    cin >> a >> op >> b;
  }
}


Error: -8

Fixed submission:

#include <iostream>

using namespace std;
int main() {
  int a, b;
  char op;
  cin >> a >> b >> op;
  while (op != '?') {
    if (op == '+') {
      cout << a + b << endl;
    } else if (op == '-') {
      cout << a - b << endl;
    } else if (op == '*') {
      cout << a * b << endl;
    } else {
      cout << a / b << endl;
    }
    cin >> a >> b >> op;
  }
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
using namespace std;

int main() {

  int a, b, c, d, e, f;
  char op;
  while (true) {
    cin >> a >> op >> b;
    if (op == '?')
      break;
    c = a + b;
    d = a - b;
    e = a * b;
    if (b != 0)
      f = a / b;

    if (op == '+')
      cout << c << "\\n";
    if (op == '-')
      cout << d << "\\n";
    if (op == '*')
      cout << e << "\\n";
    if (op == '/')
      cout << f << "\\n";
  }
}

Error: 0

Fixed submission:

#include <iostream>
using namespace std;

int main() {

  int a, b, c, d, e, f;
  char op;
  while (true) {
    cin >> a >> op >> b;
    if (op == '?')
      break;
    c = a + b;
    d = a - b;
    e = a * b;
    f = a / b;

    if (op == '+')
      cout << c << "\\n";
    if (op == '-')
      cout << d << "\\n";
    if (op == '*')
      cout << e << "\\n";
    if (op == '/')
      cout << f << "\\n";
  }
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main(void) {

  int a, b, s;
  char op;

  while (1) {
    cin >> a >> op >> b;
    if (op == '?')
      break;
    switch (op) {
    case ('+'):
      s = a + b;
      break;
    case ('-'):
      s = a - b;
      break;
    case ('*'):
      s = a * b;
      break;
    case ('/'):
      s = a / b;
      break;
    }
    cout << s << endl;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main(void) {

  int a, b, s;
  char op;

  while (1) {
    cin >> a >> b >> op;
    if (op == '?')
      break;
    switch (op) {
    case ('+'):
      s = a + b;
      break;
    case ('-'):
      s = a - b;
      break;
    case ('*'):
      s = a * b;
      break;
    case ('/'):
      s = a / b;
      break;
    }
    cout << s << endl;
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
  int a, b;
  char op;

  while (1) {
    scanf("%d %c %d", &a, &op, &b);

    if (op == '+') {

      cout << a + b << endl;
    }
    if (op == '-') {

      cout << a - b << endl;
    }
    if (op == '*') {

      cout << a * b << endl;
    }

    if (op == '/') {

      cout << a / b << endl;
    }
    if (op == '?')
      break;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
  int a, op, b;

  while (1) {
    cin >> a >> op >> b;
    if (op == '+')
      cout << a + b << endl;
    if (op == '-')
      cout << a - b << endl;
    if (op == '*')
      cout << a * b << endl;
    if (op == '/')
      cout << a / b << endl;
    if (op == '?')
      break;
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <string>

using namespace std;

int main() {
  while (1 == 1) {
    int a, b;
    string op;
    int result;
    cin >> a >> op >> b;
    if (op == "?")
      break;
    if (op == "+") {
      result = a + b;
      cout << result << endl;
    }
    if (op == "-") {
      result = a - b;
      cout << result << endl;
    }
    if (op == "*") {
      result = a * b;
      cout << result << endl;
    }
    if (op == "/") {
      result = a / b;
      cout << result << endl;
    }
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>

using namespace std;

int main() {
  while (1 == 1) {
    int a, b;
    string op;
    int result;
    cin >> a >> op >> b;
    if (op == "&")
      break;
    if (op == "+") {
      result = a + b;
      cout << result << endl;
    }
    if (op == "-") {
      result = a - b;
      cout << result << endl;
    }
    if (op == "*") {
      result = a * b;
      cout << result << endl;
    }
    if (op == "/") {
      result = a / b;
      cout << result << endl;
    }
  }
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

int main() {

  int a, b;
  char op;

  while (1) {
    cin >> a >> op >> b;
    if (op == '?') {
      break;
    } else if (op == '+') {
      cout << a + b << endl;
    } else if (op == '-') {
      cout << a - b << endl;
    } else if (op == '*') {
      cout << a * b << endl;
    } else if (op == '/') {
      cout << a / b << endl;
    }
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>

using namespace std;

int main() {

  int a, b;
  string op;
  cin >> a >> op >> b;

  while (1) {
    if (op == "?") {
      break;
    } else if (op == "+") {
      cout << a + b << endl;
    } else if (op == "-") {
      cout << a - b << endl;
    } else if (op == "*") {
      cout << a * b << endl;
    } else if (op == "/") {
      cout << a / b << endl;
    }
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
  int a, b;
  int i;
  string op;
  for (;;) {
    cin >> a >> op >> b;
    if (op == "+") {
      i = a + b;
    } else if (op == "-") {
      i = a - b;
    } else if (op == "*") {
      i = a * b;
    } else if (op == "/") {
      i = a / b;
    } else if (op == "?") {
      break;
    }
    cout << i << endl;
  }

  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
  double a, b;
  double i;
  string op;
  cin >> a >> op >> b;
  for (;;) {
    if (op == "+") {
      i = a + b;
    } else if (op == "-") {
      i = a - b;
    } else if (op == "*") {
      i = a * b;
    } else if (op == "/") {
      i = (double)a / b;
    } else if (op == "?") {
      break;
    }
    cout << setprecision(6) << i << endl;
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <stdio.h>
int main() {
  int a, b, c, d;
  char op;
  while (true) {
    scanf("%d %c %d", &a, &op, &b);
    if (op == '+') {
      c = a + b;
      printf("%d\\n", c);
    } else if (op == '-') {
      c = a - b;
      printf("%d\\n", c);
    } else if (op == '*') {
      c = a * b;
      printf("%d\\n", c);
    } else if (op == '/') {
      c = 10 * a / b;
      d = c - (c % 10);
      d = d / 10;
      c = d;
      printf("%d\\n", c);
    }

    else {
      break;
    }
  };

  return 0;
}

Error: TLE

Fixed submission:

#include <stdio.h>
int main() {
  int a, b, c, d;
  char op;
  scanf("%d %c %d", &a, &op, &b);
  while (true) {
    if (op == '+') {
      c = a + b;
      printf("%d", &c);
    } else if (op == '-') {
      c = a - b;
      printf("%d", &c);
    } else if (op == '*') {
      c = a * b;
      printf("%d", &c);
    } else if (op == '/') {
      c = 10 * a / b;
      d = c - (c % 10);
      d = d / 10;
      d = c;
      printf("%d", &c);
    }

    else {
      break;
    }
  };

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using std::cin;
using std::cout;
using std::endl;

int main() {
  int a, b;
  char op;
  while (true) {
    cin >> a >> op >> b;
    if (op == '+')
      cout << a + b << endl;
    else if (op == '-')
      cout << a - b << endl;
    else if (op == '*')
      cout << a * b << endl;
    else if (op == '/')
      cout << a / b << endl;
    else
      break;
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using std::cin;
using std::cout;
using std::endl;

int main() {
  int a, b;
  char op;
  cin >> a >> op >> b;
  while (true) {

    if (op == '+')
      cout << a + b << endl;
    else if (op == '-')
      cout << a - b << endl;
    else if (op == '*')
      cout << a * b << endl;
    else if (op == '/')
      cout << a / b << endl;
    else
      break;
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Runtime Error

#include <stdio.h>

int main(void) {
  int a, b;
  char str[16];
  char op;

  scanf("%d%s%d", &a, str, &b);
  op = str[0];
  while (op != '?') {
    printf("%d\\n", op == '+'   ? a + b
                   : op == '-' ? a - b
                   : op == '*' ? a * b
                               : a / b);
    scanf("%d%s%d", &a, str, &b);
    op = str[0];
  }
  return 0;
}

Error: -8

Fixed submission:

#include <stdio.h>

int main(void) {
  int a, b;
  char op;

  scanf("%d%c*c%d", &a, &op, &b);
  while (op != '?') {
    printf("%d\\n", op == '+'   ? a + b
                   : op == '-' ? a - b
                   : op == '*' ? a * b
                               : a / b);
    scanf("%d%c*c%d", &a, &op, &b);
  }
  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <stdio.h>
int main() {

  int a, b;
  char op;

  while (scanf("%d %c %d", &a, &op, &b), op != '?') {

    if (op == '+')
      printf("%d\\n", a + b);
    else if (op == '-')
      printf("%d\\n", a - b);
    else if (op == '*')
      printf("%d\\n", a * b);
    else
      printf("%d\\n", a / b);
  }

  return 0;
}


Error: TLE

Fixed submission:

#include <stdio.h>
int main() {

  int a, b;
  char op;

  while (scanf("%d%c%d", &a, &op, &b), op != '?') {

    if (op == '+')
      printf("%d\\n", a + b);
    if (op == '-')
      printf("%d\\n", a - b);
    if (op == '*')
      printf("%d\\n", a * b);
    if (op == '/')
      printf("%d\\n", a / b);
  }

  return 0;
}
Problem p02401 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <stdio.h>
int main(void) {
  int a, b;
  char op;

  while (1) {
    scanf("%d %c %d", &a, &op, &b);
    if (op == '+') {
      printf("%d\\n", a + b);
    }
    if (op == '-') {
      printf("%d\\n", a - b);
    }
    if (op == '*') {
      printf("%d\\n", a * b);
    }
    if (op == '/') {
      printf("%d\\n", a / b);
    }
    if (op == '?') {
      break;
    }
  }
  return 0;
}

Error: TLE

Fixed submission:

#include <stdio.h>
int main(void) {
  int a, b;
  char op;

  while (1) {
    scanf("%d%c%d", &a, &op, &b);
    if (op == '+') {
      printf("%d", a + b);
    }
    if (op == '-') {
      printf("%d", a - b);
    }
    if (op == '*') {
      printf("%d", a * b);
    }
    if (op == '?') {
      break;
    }
  }
  return 0;
}