View Code of Problem 20

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 * 
 * @author Ember
 *
 */

public class Main {
	 public static void main(String[] args) throws IOException {
		 BufferedReader brd = new BufferedReader(new InputStreamReader(System.in));
		 String string;
		 while((string = brd.readLine() )!= null) {
			 int n = Integer.parseInt(string);
			 if (n%3 == 0) {
					System.out.println("Yes");
				}else {
					System.out.println("No");
				}
		 }
	 }
	
}
  

Double click to view unformatted code.


Back to problem 20