Biswajit608's blog

By Biswajit608, history, 3 years ago, In English

Here is the problem statement

import java.util.*; public class Main{

public static void main(String[] args){

Scanner scn = new Scanner(System.in);
int test = scn.nextInt();
while(test > 0){
   long n = scn.nextLong();
    if(n < 6){
      System.out.println(15);
      continue;
    }
    if(n % 2 != 0){
       n = n +1; 
    }
    System.out.println((long)(n * 2.5));
   test--;
}

}

}

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Don't know if you still need help but your continue statement in the if statement is making it skip the test --, so the while loop keeps going even after all the input is read.