B.java 576 B

12345678910111213141516171819202122232425
  1. import java.util.Scanner;
  2. /**
  3. * Created by chshru on 2017/11/4.
  4. */
  5. public class B {
  6. public static void main(String[] args) {
  7. Scanner cin = new Scanner(System.in);
  8. int t = cin.nextInt();
  9. while (t-- > 0) {
  10. int m = cin.nextInt();
  11. int n = (1200 - 6 * m) / 7;
  12. if ((1200 - 6 * m) % 7 != 0)
  13. n++;
  14. System.out.print(n / 2);
  15. if (n % 2 != 0)
  16. System.out.print(".5");
  17. System.out.println();
  18. }
  19. cin.close();
  20. }
  21. }