Submission #4066866
Source Code Expand
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastScanner in = new FastScanner(inputStream); PrintWriter out = new PrintWriter(outputStream); TaskA solver = new TaskA(); solver.solve(1, in, out); out.close(); } static class TaskA { public void solve(int testNumber, FastScanner in, PrintWriter out) { int n = 100 * in.nextInt() + 10 * in.nextInt() + in.nextInt(); out.println((n & 3) == 0 ? "YES" : "NO"); } } static class FastScanner { private InputStream in; private byte[] buffer = new byte[1024]; private int bufPointer; private int bufLength; public FastScanner(InputStream in) { this.in = in; } private int readByte() { if (bufPointer >= bufLength) { if (bufLength == -1) throw new InputMismatchException(); bufPointer = 0; try { bufLength = in.read(buffer); } catch (IOException e) { throw new InputMismatchException(); } if (bufLength <= 0) return -1; } return buffer[bufPointer++]; } private static boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public long nextLong() { long n = 0; int b = readByte(); while (isSpaceChar(b)) b = readByte(); boolean minus = (b == '-'); if (minus) b = readByte(); while (b >= '0' && b <= '9') { n *= 10; n += b - '0'; b = readByte(); } if (!isSpaceChar(b)) throw new NumberFormatException(); return minus ? -n : n; } public int nextInt() { long n = nextLong(); if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) throw new NumberFormatException(); return (int) n; } } }
Submission Info
Submission Time | |
---|---|
Task | A - RGB Cards |
User | kawazu |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 2679 Byte |
Status | AC |
Exec Time | 71 ms |
Memory | 22484 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 71 ms | 20820 KB |
in2.txt | AC | 70 ms | 19028 KB |
in3.txt | AC | 71 ms | 18516 KB |
in4.txt | AC | 70 ms | 20180 KB |
in5.txt | AC | 70 ms | 22484 KB |
s1.txt | AC | 69 ms | 21460 KB |
s2.txt | AC | 70 ms | 19412 KB |