Language: C++

import java.io.InputStream;
import java.io.IOException;
import java.util.NoSuchElementException;
import static java.lang.System.*;

class FastScanner {
  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;}
  public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; 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() {
    long nl = nextLong();
    if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
    return (int) nl;
  }
  public double nextDouble() { return Double.parseDouble(next());}
}

public class Main {
  public static void main(String[] args) {
    FastScanner fs = new FastScanner();

    int x = fs.nextInt();
    int a = fs.nextInt();
    int b = fs.nextInt();

    x -= a;
    while (x - b >= 0) {
      x-= b;
    }
    out.println(x);
  }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.InputStream;
      | ^~~~~~
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.IOException;
      | ^~~~~~
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.NoSuchElementException;
      | ^~~~~~
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 static java.lang.System.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:10: error: expected ':' before 'final'
    7 |   private final InputStream in = System.in;
      |          ^~~~~~
      |          :
a.cc:7:11: error: 'final' does not name a type
    7 |   private final InputStream in = System.in;
      |           ^~~~~
a.cc:8:10: error: expected ':' before 'final'
    8 |   private final byte[] buffer = new byte[1024];
      |          ^~~~~~
      |          :
a.cc:8:11: error: 'final' does not name a type
    8 |   private final byte[] buffer = new byte[1024];
      |           ^~~~~
a.cc:9:10: error: expected ':' before 'int'
    9 |   private int ptr = 0;
      |          ^~~~
      |          :
a.cc:10:10: error: expected ':' before 'int'
   10 |   private int buflen = 0;
      |          ^~~~
      |          :
a.cc:11:10: error: expected ':' before 'boolean'
   11 |   private boolean hasNextByte() {
      |          ^~~~~~~~
      |          :
a.cc:11:11: error: 'boolean' does not name a type; did you mean 'bool'?
   11 |   private boolean hasNextByte() {
      |           ^~~~~~~
      |           bool
a.cc:27:10: error: expected ':' before 'int'
   27 |   private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |          ^~~~
      |          :
a.cc:28:10: error: expected ':' before 'static'
   28 |   private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |          ^~~~~~~
      |          :
a.cc:28:18: error: 'boolean' does not name a type; did you mean 'bool'?
   28 |   private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |                  ^~~~~~~
      |                  bool
a.cc:29:9: error: expected ':' before 'boolean'
   29 |   public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
      |         ^~~~~~~~
      |         :
a.cc:29:10: error: 'boolean' does not name a type; did you mean 'bool'?
   29 |   public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
      |          ^~~~~~~
      |          bool
a.cc:30:9: error: expected ':' before 'String'
   30 |   public String next() {
      |         ^~~~~~~
      |         :
a.cc:30:10: error: 'String' does not name a type
   30 |   public String next() {
      |          ^~~~~~
a.cc:40:9: error: expected ':' before 'long'
   40 |   public long nextLong() {
      |         ^~~~~
      |         :
a.cc:64:9: error: expected ':' before 'int'
   64 |   public int nextInt() {
      |         ^~~~
      |         :
a.cc:69:9: error: expected ':' before 'double'
   69 |   public double nextDouble() { return Double.parseDouble(next());}
      |         ^~~~~~~
      |         :
a.cc:70:2: error: expected ';' after class definition
   70 | }
      |  ^
      |  ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:27:32: error: 'hasNextByte' was not declared in this scope
   27 |   private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                ^~~~~~~~~~~
a.cc:27:54: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   27 |   private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                                      ^~~~~~
      |                                                      buflen
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:41:10: error: 'hasNext' was not declared in this scope
   41 |     if (!hasNext()) throw new NoSuchElementException();
      |          ^~~~~~~
a.cc:41:31: error: expected type-specifier before 'NoSuchElementException'
   41 |     if (!hasNext()) throw new NoSuchElementException();
      |                               ^~~~~~~~~~~~~~~~~~~~~~
a.cc:43:5: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   43 |     boolean minus = false;
      |     ^~~~~~~
      |     bool
a.cc:46:7: error: 'minus' was not declared in this scope
   46 |       minus = true;
      |       ^~~~~
a.cc:50:17: error: expected type-specifier before 'NumberFormatException'
   50 |       throw new NumberFormatException();
      |                 ^~~~~~~~~~~~~~~~~~~~~
a.cc:56:28: error: 'isPrintableChar' was not declared in this scope
   56 |       }else if(b == -1 || !isPrintableChar(b)){
      |                            ^~~~~~~~~~~~~~~
a.cc:57:16: error: 'minus' was not declared in this scope
   57 |         return minus ? -n : n;
      |                ^~~~~
a.cc:59:19: error: expected type-specifier before 'NumberFormatException'
   59 |         throw new NumberFormatException();
      |                   ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'int FastScanner::nextInt()':
a.cc:66:14: error: 'Integer' was not declared in this scope
   66 |     if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
      |              ^~~~~~~
a.cc:66:69: error: expected type-specifier before 'NumberFormatException'
   66 |     if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
      |                                                                     ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'double FastScanner::nextDouble()':
a.cc:69:39: error: 'Double' was not declared in this scope; did you mean 'double'?
   69 |   public double nextDouble() { return Double.parseDouble(next());}
      |                                       ^~~~~~
      |                                       double
a.cc:69:58: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   69 |   public double nextDouble() { return Double.parseDouble(next());}
      |                                                          ^~~~
      |                                                          nextInt
a.cc: At global scope:
a.cc:72:1: error: expected unqualified-id before 'public'
   72 | public class Main {
      | ^~~~~~