Advertisement
Lusien_Lashans

ОГЭ

Apr 9th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import javax.swing.plaf.synth.SynthDesktopIconUI;
  2. import java.util.HashMap;
  3. import java.util.Map;
  4. import java.util.Scanner;
  5.  
  6. public class Main {
  7.     public static void main(String[] args) {
  8.         Scanner input = new Scanner(System.in);
  9.         String x = input.nextLine();
  10.         int count = 0;
  11.         int y = Integer.parseInt(x);
  12.         while (y!=0){
  13.             if ((x.length() == 3)&&(y % 4 == 0)){
  14.                 count++;
  15.             }
  16.             x = input.nextLine();
  17.             y = Integer.parseInt(x);
  18.         }
  19.         System.out.println(count);
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement