Language: Java

/**
 * @brief  : c++ code for AtCoder
 * @author : rk222
 * @created: 2020.06.27 20:56:41
 */

#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

// #define int long long

typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef tuple<int, int, int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<tuple<int, int, int>> vt;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i, x) for (int i = 0; i < x; i++)
#define rep1(i, x) for (int i = 1; i <= x; i++)
#define srep(i, s, x) for (int i = s; i < x; i++)
#define rrep(i, x) for (int i = x - 1; i >= 0; i--)
#define rrep1(i, x) for (int i = x; i > 0; i--)
#define rsrep(i, s, x) for (int i = x - 1; i >= s; i--)
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, a) lower_bound(vec.begin(), vec.end(), a)
#define ub(vec, a) upper_bound(vec.begin(), vec.end(), a)
#define uniq(vec) vec.erase(unique(vec.begin(), vec.end()), vec.end())
#define mp1(a, b, c) P1(a, P(b, c))
#define dame                                                                                  \
    {                                                                                         \
        puts("-1");                                                                           \
        return 0;                                                                             \
    }
#define yn                                                                                    \
    puts("Yes");                                                                              \
    else puts("No")
#define YN                                                                                    \
    puts("YES");                                                                              \
    else puts("NO")

template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string &s) {
    return '"' + s + '"';
}
string to_string(const char *s) {
    return to_string((string)s);
}
string to_string(bool b) {
    return (b ? "true" : "false");
}
string to_string(vector<bool> v) {
    bool first = true;
    string ret = "{";
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
        if (!first) {
            ret += ", ";
        }
        first = false;
        ret += to_string(v[i]);
    }
    ret += "}";
    return ret;
}
template <size_t N> string to_string(bitset<N> v) {
    string ret = "";
    for (size_t i = 0; i < N; i++) {
        ret += static_cast<char>('0' + v[i]);
    }
    return ret;
}
template <typename A> string to_string(A v) {
    bool first = true;
    string ret = "{";
    for (const auto &x : v) {
        string s = to_string(x);
        if (!first) {
            ret += ", ";
        }
        if (s[0] == '{') {
            s = "\n" + s;
        }
        first = false;
        ret += s;
    }
    if (ret[ret.size() - 1] == '}') {
        ret += "\n}";
    } else {
        ret += "}";
    }
    return ret;
}
template <typename A, typename... Lest> string to_string(A *v, int n, Lest... L) {
    bool first = true;
    string ret = "{";
    rep(i, n) {
        auto x = v[i];
        string s = to_string(x, L...);
        if (!first) {
            ret += ", ";
        }
        if (s[0] == '{') {
            s = "\n" + s;
        }
        first = false;
        ret += s;
    }
    if (ret[ret.size() - 1] == '}') {
        ret += "\n}";
    } else {
        ret += "}";
    }
    return ret;
}
template <typename A, typename B> string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
           to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
           to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void name_disp(string s) {
    cerr << "-------" << endl;
    cerr << s << ": " << endl;
}
void val_disp() {
    cerr << endl;
}
template <typename First, typename... Lest> void val_disp(First F, Lest... L) {
    cerr << to_string(F) << endl;
    val_disp(L...);
}
template <typename A, typename... Lest> void val_disp(A *v, Lest... L) {
    cerr << to_string(v, L...) << endl;
    val_disp();
}
#define disp(...)                                                                             \
    name_disp(#__VA_ARGS__);                                                                  \
    val_disp(__VA_ARGS__)
#define adisp(a, ...)                                                                         \
    name_disp(#a);                                                                            \
    val_disp(a, __VA_ARGS__)

#ifdef int
const ll INF = 1002003004005006007ll;
#else
const int INF = 1002003004;
#endif

const int M = 100000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}, {-1, -1}, {0, -1}, {1, -1}};

/* ------------------------------------- */

signed main() {
    int a;
    scanf("%d", &a);
    printf("%d\n", a + a * a + a * a * a);
    /* --------------------------------- */
    return 0;
};

Compiler output:
Main.java:7: error: illegal character: '#'
#define _CRT_SECURE_NO_WARNINGS
^
Main.java:8: error: illegal character: '#'
#include <algorithm>
^
Main.java:9: error: illegal character: '#'
#include <bitset>
^
Main.java:10: error: illegal character: '#'
#include <cmath>
^
Main.java:11: error: illegal character: '#'
#include <cstdio>
^
Main.java:12: error: illegal character: '#'
#include <iostream>
^
Main.java:13: error: illegal character: '#'
#include <map>
^
Main.java:14: error: illegal character: '#'
#include <queue>
^
Main.java:15: error: illegal character: '#'
#include <set>
^
Main.java:16: error: illegal character: '#'
#include <stack>
^
Main.java:17: error: illegal character: '#'
#include <string>
^
Main.java:18: error: illegal character: '#'
#include <vector>
^
Main.java:23: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:24: error: class, interface, enum, or record expected
typedef long double ld;
^
Main.java:25: error: class, interface, enum, or record expected
typedef pair<int, int> P;
^
Main.java:26: error: class, interface, enum, or record expected
typedef pair<int, P> P1;
^
Main.java:27: error: class, interface, enum, or record expected
typedef tuple<int, int, int> T;
^
Main.java:28: error: class, interface, enum, or record expected
typedef vector<int> vi;
^
Main.java:29: error: class, interface, enum, or record expected
typedef vector<vi> vvi;
^
Main.java:30: error: class, interface, enum, or record expected
typedef vector<ll> vl;
^
Main.java:31: error: class, interface, enum, or record expected
typedef vector<P> vp;
^
Main.java:32: error: class, interface, enum, or record expected
typedef vector<tuple<int, int, int>> vt;
^
Main.java:34: error: illegal character: '#'
#define fr first
^
Main.java:35: error: illegal character: '#'
#define sc second
^
Main.java:36: error: illegal character: '#'
#define mp make_pair
^
Main.java:37: error: illegal character: '#'
#define pb push_back
^
Main.java:38: error: illegal character: '#'
#define rep(i, x) for (int i = 0; i < x; i++)
^
Main.java:38: error: class, interface, enum, or record expected
#define rep(i, x) for (int i = 0; i < x; i++)
                                  ^
Main.java:38: error: class, interface, enum, or record expected
#define rep(i, x) for (int i = 0; i < x; i++)
                                         ^
Main.java:39: error: illegal character: '#'
#define rep1(i, x) for (int i = 1; i <= x; i++)
^
Main.java:39: error: class, interface, enum, or record expected
#define rep1(i, x) for (int i = 1; i <= x; i++)
                                   ^
Main.java:39: error: class, interface, enum, or record expected
#define rep1(i, x) for (int i = 1; i <= x; i++)
                                           ^
Main.java:40: error: illegal character: '#'
#define srep(i, s, x) for (int i = s; i < x; i++)
^
Main.java:40: error: class, interface, enum, or record expected
#define srep(i, s, x) for (int i = s; i < x; i++)
                                      ^
Main.java:40: error: class, interface, enum, or record expected
#define srep(i, s, x) for (int i = s; i < x; i++)
                                             ^
Main.java:41: error: illegal character: '#'
#define rrep(i, x) for (int i = x - 1; i >= 0; i--)
^
Main.java:41: error: class, interface, enum, or record expected
#define rrep(i, x) for (int i = x - 1; i >= 0; i--)
                                       ^
Main.java:41: error: class, interface, enum, or record expected
#define rrep(i, x) for (int i = x - 1; i >= 0; i--)
                                               ^
Main.java:42: error: illegal character: '#'
#define rrep1(i, x) for (int i = x; i > 0; i--)
^
Main.java:42: error: class, interface, enum, or record expected
#define rrep1(i, x) for (int i = x; i > 0; i--)
                                    ^
Main.java:42: error: class, interface, enum, or record expected
#define rrep1(i, x) for (int i = x; i > 0; i--)
                                           ^
Main.java:43: error: illegal character: '#'
#define rsrep(i, s, x) for (int i = x - 1; i >= s; i--)
^
Main.java:43: error: class, interface, enum, or record expected
#define rsrep(i, s, x) for (int i = x - 1; i >= s; i--)
                                           ^
Main.java:43: error: class, interface, enum, or record expected
#define rsrep(i, s, x) for (int i = x - 1; i >= s; i--)
                                                   ^
Main.java:44: error: illegal character: '#'
#define maxs(x, y) (x = max(x, y))
^
Main.java:45: error: illegal character: '#'
#define mins(x, y) (x = min(x, y))
^
Main.java:46: error: illegal character: '#'
#define limit(x, l, r) max(l, min(x, r))
^
Main.java:47: error: illegal character: '#'
#define lims(x, l, r) (x = max(l, min(x, r)))
^
Main.java:48: error: illegal character: '#'
#define sor(v) sort(v.begin(), v.end())
^
Main.java:49: error: illegal character: '#'
#define rev(s) reverse(s.begin(), s.end())
^
Main.java:50: error: illegal character: '#'
#define lb(vec, a) lower_bound(vec.begin(), vec.end(), a)
^
Main.java:51: error: illegal character: '#'
#define ub(vec, a) upper_bound(vec.begin(), vec.end(), a)
^
Main.java:52: error: illegal character: '#'
#define uniq(vec) vec.erase(unique(vec.begin(), vec.end()), vec.end())
^
Main.java:53: error: illegal character: '#'
#define mp1(a, b, c) P1(a, P(b, c))
^
Main.java:54: error: illegal character: '#'
#define dame                                                                                  \
^
Main.java:54: error: illegal character: '\'
#define dame                                                                                  \
                                                                                              ^
Main.java:55: error: illegal character: '\'
    {                                                                                         \
                                                                                              ^
Main.java:56: error: illegal character: '\'
        puts("-1");                                                                           \
                                                                                              ^
Main.java:57: error: class, interface, enum, or record expected
        return 0;                                                                             \
               ^
Main.java:57: error: illegal character: '\'
        return 0;                                                                             \
                                                                                              ^
Main.java:59: error: illegal character: '#'
#define yn                                                                                    \
^
Main.java:59: error: illegal character: '\'
#define yn                                                                                    \
                                                                                              ^
Main.java:60: error: illegal character: '\'
    puts("Yes");                                                                              \
                                                                                              ^
Main.java:61: error: class, interface, enum, or record expected
    else puts("No")
         ^
Main.java:62: error: illegal character: '#'
#define YN                                                                                    \
^
Main.java:62: error: illegal character: '\'
#define YN                                                                                    \
                                                                                              ^
Main.java:63: error: illegal character: '\'
    puts("YES");                                                                              \
                                                                                              ^
Main.java:64: error: class, interface, enum, or record expected
    else puts("NO")
         ^
Main.java:67: error: class, interface, enum, or record expected
template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p);
^
Main.java:68: error: class, interface, enum, or record expected
template <typename A, typename B, typename C, typename D>
^
Main.java:70: error: unnamed classes are a preview feature and are disabled by default.
string to_string(const string &s) {
^
  (use --enable-preview to enable unnamed classes)
Main.java:70: error: illegal start of type
string to_string(const string &s) {
                 ^
Main.java:73: error: illegal start of type
string to_string(const char *s) {
                 ^
Main.java:73: error: class, interface, enum, or record expected
string to_string(const char *s) {
                       ^
Main.java:75: error: class, interface, enum, or record expected
}
^
Main.java:78: error: class, interface, enum, or record expected
}
^
Main.java:82: error: class, interface, enum, or record expected
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
    ^
Main.java:82: error: class, interface, enum, or record expected
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
                    ^
Main.java:82: error: class, interface, enum, or record expected
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
                                                    ^
Main.java:85: error: class, interface, enum, or record expected
        }
        ^
Main.java:87: error: class, interface, enum, or record expected
        ret += to_string(v[i]);
        ^
Main.java:88: error: class, interface, enum, or record expected
    }
    ^
Main.java:90: error: class, interface, enum, or record expected
    return ret;
    ^
Main.java:91: error: class, interface, enum, or record expected
}
^
Main.java:94: error: class, interface, enum, or record expected
    for (size_t i = 0; i < N; i++) {
    ^
Main.java:94: error: class, interface, enum, or record expected
    for (size_t i = 0; i < N; i++) {
                       ^
Main.java:94: error: class, interface, enum, or record expected
    for (size_t i = 0; i < N; i++) {
                              ^
Main.java:96: error: class, interface, enum, or record expected
    }
    ^