Language: Java

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using P	  = pair<ll, ll>;
using mat = vector<vector<ll>>;
typedef string::const_iterator State;
class ParseError {};

void IOS() { ios::sync_with_stdio(false), cin.tie(0); }

constexpr ll INF = 1e16;
constexpr ll INM = 114514;
constexpr ll MOD = 1e9 + 7;
constexpr ld EPS = 1e-12;

template <typename T>
void dump(T x) { cout << x << endl; }
void dumpf(ld x, int t) { cout << setprecision(t) << fixed << x << endl; }
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
	fill((T *)array, (T *)(array + N), val);
}
inline ll mod(ll a, ll b) {
	if (a > 0) return a % b;
	if (a % b == 0) return 0;
	ll x = -a / b + 1;
	a += x * b;
	return a % b;
}
ll powm(ll a, ll b, ll c) {
	if (b == 0)
		return 1;
	else if (b % 2 == 0) {
		ll d = powm(a, b / 2, c);
		return (d * d) % c;
	} else
		return (a * powm(a, b - 1, c)) % c;
}
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};

int main() {
	IOS();
	string s;
	cin >> s;
	if (s == "SUN")
		dump(7);
	else if (s == "MON")
		dump(6);
	else if (s == "TUE")
		dump(5);
	else if (s == "WED")
		dump(4);
	else if (s == "THU")
		dump(3);
	else if (s == "FRI")
		dump(2);
	else if (s == "SAT")
		dump(1);
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#define _USE_MATH_DEFINES
^
Main.java:2: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:4: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:5: error: class, interface, enum, or record expected
typedef unsigned long long ull;
^
Main.java:6: error: class, interface, enum, or record expected
typedef long double ld;
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
using P	  = pair<ll, ll>;
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
using P	  = pair<ll, ll>;
       	               ^
Main.java:8: error: illegal start of expression
using mat = vector<vector<ll>>;
                              ^
Main.java:9: error: class, interface, enum, or record expected
typedef string::const_iterator State;
^
Main.java:12: error: not a statement
void IOS() { ios::sync_with_stdio(false), cin.tie(0); }
             ^
Main.java:12: error: ';' expected
void IOS() { ios::sync_with_stdio(false), cin.tie(0); }
                                 ^
Main.java:14: error: class, interface, enum, or record expected
constexpr ll INF = 1e16;
^
Main.java:15: error: class, interface, enum, or record expected
constexpr ll INM = 114514;
^
Main.java:16: error: class, interface, enum, or record expected
constexpr ll MOD = 1e9 + 7;
^
Main.java:17: error: class, interface, enum, or record expected
constexpr ld EPS = 1e-12;
^
Main.java:19: error: class, interface, enum, or record expected
template <typename T>
^
Main.java:20: error: class, interface, enum, or record expected
void dump(T x) { cout << x << endl; }
                                    ^
Main.java:21: error: class, interface, enum, or record expected
void dumpf(ld x, int t) { cout << setprecision(t) << fixed << x << endl; }
                                                                         ^
Main.java:25: error: class, interface, enum, or record expected
}
^
Main.java:28: error: class, interface, enum, or record expected
	if (a % b == 0) return 0;
	^
Main.java:30: error: class, interface, enum, or record expected
	a += x * b;
	^
Main.java:31: error: class, interface, enum, or record expected
	return a % b;
	^
Main.java:32: error: class, interface, enum, or record expected
}
^
Main.java:36: error: class, interface, enum, or record expected
	else if (b % 2 == 0) {
	^
Main.java:38: error: class, interface, enum, or record expected
		return (d * d) % c;
		^
Main.java:39: error: class, interface, enum, or record expected
	} else
	^
Main.java:41: error: class, interface, enum, or record expected
}
^
Main.java:44: error: class, interface, enum, or record expected
	return gcd(b, a % b);
	^
Main.java:45: error: class, interface, enum, or record expected
}
^
Main.java:46: error: class, interface, enum, or record expected
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
                                               ^
Main.java:48: error: class, interface, enum, or record expected
ll dy[4] = {0, 1, 0, -1};
^
Main.java:53: error: not a statement
	cin >> s;
	    ^
32 errors