Advertisement
Spocoman

Choreography

Sep 3rd, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int steps = Integer.parseInt(scanner.nextLine()),
  7.                 dancers = Integer.parseInt(scanner.nextLine()),
  8.                 days = Integer.parseInt(scanner.nextLine());
  9.  
  10.         double dayStepPercent = Math.ceil((double) steps / days / steps * 100),
  11.                 dancerStepPercent = dayStepPercent / dancers;
  12.  
  13.         if (dayStepPercent < 13) {
  14.             System.out.printf("Yes, they will succeed in that goal! %.2f%%.\n", dancerStepPercent);
  15.         } else {
  16.             System.out.printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day.\n", dancerStepPercent);
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement