Language: C++

import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;

class Main {
	public static void main(String[] args) {
		new Main().B();
	}

	void A() {
		Scanner sc = new Scanner();
		int N = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ma = -1, mi = 101;
		for (int i = 0; i <= Math.min(A, B); ++i) {// A,B両方
			int j = A - i;
			int k = B - i;
			if (i + j + k > N || j < 0 || k < 0)
				continue;
			ma = Math.max(i, ma);
			mi = Math.min(i, mi);
		}
		System.out.println(ma + " " + mi);

	}

	void B() {
		Scanner sc = new Scanner();
		int n = sc.nextInt();
		String a = sc.next();
		String b = sc.next();
		String c = sc.next();
		int ans = 0;
		for (int i = 0; i < n; ++i) {
			if (a.charAt(i) == b.charAt(i) && b.charAt(i) == c.charAt(i)) {
				continue;
			} else if (a.charAt(i) == b.charAt(i) || b.charAt(i) == c.charAt(i) || c.charAt(i) == a.charAt(i)) {
				ans += 1;
			} else {
				ans += 2;
			}
		}
		System.out.println(ans);
	}


	void tr(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

}

class Scanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		return (int) nextLong();
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.IOException;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStream;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Arrays;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Comparator;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.HashMap;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.HashSet;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.NoSuchElementException;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.PriorityQueue;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:15: error: expected ':' before 'static'
   11 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:11:33: error: 'String' has not been declared
   11 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:11:42: error: expected ',' or '...' before 'args'
   11 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:53:17: error: 'Object' has not been declared
   53 |         void tr(Object... o) {
      |                 ^~~~~~
a.cc:53:27: error: expansion pattern 'int' contains no parameter packs
   53 |         void tr(Object... o) {
      |                           ^
a.cc:57:2: error: expected ';' after class definition
   57 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:12:27: error: expected ';' before '.' token
   12 |                 new Main().B();
      |                           ^
a.cc: In member function 'void Main::A()':
a.cc:16:17: error: 'Scanner' was not declared in this scope
   16 |                 Scanner sc = new Scanner();
      |                 ^~~~~~~
a.cc:17:25: error: 'sc' was not declared in this scope
   17 |                 int N = sc.nextInt();
      |                         ^~
a.cc:21:38: error: 'Math' was not declared in this scope
   21 |                 for (int i = 0; i <= Math.min(A, B); ++i) {// A,B両方
      |                                      ^~~~
a.cc:29:17: error: 'System' was not declared in this scope
   29 |                 System.out.println(ma + " " + mi);
      |                 ^~~~~~
a.cc: In member function 'void Main::B()':
a.cc:34:17: error: 'Scanner' was not declared in this scope
   34 |                 Scanner sc = new Scanner();
      |                 ^~~~~~~
a.cc:35:25: error: 'sc' was not declared in this scope
   35 |                 int n = sc.nextInt();
      |                         ^~
a.cc:36:17: error: 'String' was not declared in this scope
   36 |                 String a = sc.next();
      |                 ^~~~~~
a.cc:37:24: error: expected ';' before 'b'
   37 |                 String b = sc.next();
      |                        ^
a.cc:38:24: error: expected ';' before 'c'
   38 |                 String c = sc.next();
      |                        ^
a.cc:41:29: error: 'a' was not declared in this scope
   41 |                         if (a.charAt(i) == b.charAt(i) && b.charAt(i) == c.charAt(i)) {
      |                             ^
a.cc:41:44: error: 'b' was not declared in this scope
   41 |                         if (a.charAt(i) == b.charAt(i) && b.charAt(i) == c.charAt(i)) {
      |                                            ^
a.cc:41:74: error: 'c' was not declared in this scope
   41 |                         if (a.charAt(i) == b.charAt(i) && b.charAt(i) == c.charAt(i)) {
      |                                                                          ^
a.cc:49:17: error: 'System' was not declared in this scope
   49 |                 System.out.println(ans);
      |                 ^~~~~~
a.cc: In member function 'void Main::tr(...)':
a.cc:54:17: error: 'System' was not declared in this scope
   54 |                 System.out.println(Arrays.deepToString(o));
      |                 ^~~~~~
a.cc:54:36: error: 'Arrays' was not declared in this scope
   54 |                 System.out.println(Arrays.deepToString(o));
      |                                    ^~~~~~
a.cc:54:56: error: 'o' was not declared in this scope
   54 |                 System.out.println(Arrays.deepToString(o));
      |                                                        ^
a.cc: At global scope:
a.cc:60:16: error: expected ':' before 'final'
   60 |         private final InputStream in = System.in;
      |                ^~~~~~
      |                :
a.cc:60:17: error: 'final' does not name a type
   60 |         private final InputStream in = System.in;
      |                 ^~~~~
a.cc:61:16: error: expected ':' before 'final'
   61 |         private final byte[] buffer = new byte[1024];
      |                ^~~~~~
      |                :
a.cc:61:17: error: 'final' does not name a type
   61 |         private final byte[] buffer = new byte[1024];
      |                 ^~~~~
a.cc:62:16: error: expected ':' before 'int'
   62 |         private int ptr = 0;
      |                ^~~~
      |                :
a.cc:63:16: error: expected ':' before 'int'
   63 |         private int buflen = 0;
      |                ^~~~
      |                :
a.cc:65:16: error: expected ':' before 'boolean'
   65 |         private boolean hasNextByte() {
      |                ^~~~~~~~
      |                :
a.cc:65:17: error: 'boolean' does not name a type; did you mean 'bool'?
   65 |         private boolean hasNextByte() {
      |                 ^~~~~~~
      |                 bool
a.cc:82:16: error: expected ':' before 'int'
   82 |         private int readByte() {
      |                ^~~~
      |                :
a.cc:89:16: error: expected ':' before 'static'
   89 |         private static boolean isPrintableChar(int c) {
      |                ^~~~~~~
      |                :
a.cc:89:24: error: 'boolean' does not name a type; did you mean 'bool'?
   89 |         private static boolean isPrintableChar(int c) {
      |                        ^~~~~~~
      |                        bool
a.cc:93:16: error: expected ':' before 'void'
   93 |         private void skipUnprintable() {
      |                ^~~~~
      |                :
a.cc:98:15: error: expected ':' before 'boolean'
   98 |         public boolean hasNext() {
      |               ^~~~~~~~
      |               :
a.cc:98:16: error: 'boolean' does not name a type; did you mean 'bool'?
   98 |         public boolean hasNext() {
      |                ^~~~~~~
      |                bool
a.cc:103:15: error: expected ':' before 'String'
  103 |         public String next() {
      |               ^~~~~~~
      |               :
a.cc:103:16: error: 'String' does not name a type
  103 |         public String next() {
      |                ^~~~~~
a.cc:115:15: error: expected ':' before 'long'
  115 |         public long nextLong() {
      |               ^~~~~
      |               :
a.cc:141:15: error: expected ':' before 'int'
  141 |         public int nextInt() {
      |               ^~~~
      |               :
a.cc:144:2: error: expected ';' after class definition
  144 | }
      |  ^
      |  ;
a.cc: In member function 'int Scanner::readByte()':
a.cc:83:21: error: 'hasNextByte' was not declared in this scope
   83 |                 if (hasNextByte())
      |                     ^~~~~~~~~~~
a.cc:84:32: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   84 |                         return buffer[ptr++];
      |                                ^~~~~~
      |                                buflen
a.cc: In member function 'void Scanner::skipUnprintable()':
a.cc:94:24: error: 'hasNextByte' was not declared in this scope
   94 |                 while (hasNextByte() && !isPrintableChar(buffer[ptr]))
      |                        ^~~~~~~~~~~
a.cc:94:58: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   94 |                 while (hasNextByte() && !isPrintableChar(buffer[ptr]))
      |                                                          ^~~~~~
      |                                                          buflen
a.cc:94:42: error: 'isPrintableChar' was not declared in this scope
   94 |                 while (hasNextByte() && !isPrintableChar(buffer[ptr]))
      |                                          ^~~~~~~~~~~~~~~
a.cc: In member function 'long int Scanner::nextLong()':
a.cc:116:22: error: 'hasNext' was not declared in this scope
  116 |                 if (!hasNext())
      |                      ^~~~~~~
a.cc:117:35: error: expected type-specifier before 'NoSuchElementException'
  117 |                         throw new NoSuchElementException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
a.cc:119:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
  119 |                 boolean minus = false;
      |                 ^~~~~~~
      |                 bool
a.cc:122:25: error: 'minus' was not declared in this scope
  122 |                         minus = true;
      |                         ^~~~~
a.cc:126:35: error: expected type-specifier before 'NumberFormatException'
  126 |                         throw new NumberFormatException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~
a.cc:132:48: error: 'isPrintableChar' was not declared in this scope
  132 |                         } else if (b == -1 || !isPrintableChar(b)) {
      |                                                ^~~~~~~~~~~~~~~
a.cc:133