SHARE
TWEET

Untitled

markopizzy Jan 24th, 2020 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class JF_Spice_Flow {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int yield = Integer.parseInt(scanner.nextLine());
  8.         int pureLeft = 0;
  9.         int daysWorked = 0;
  10.         boolean isFinished = false;
  11.  
  12.         while (yield >= 100) {
  13.             isFinished = true;
  14.             pureLeft += yield - 26;
  15.             yield -= 10;
  16.             daysWorked++;
  17.         }
  18.         if (isFinished) {
  19.             pureLeft -= 26;
  20.             System.out.println(daysWorked);
  21.             System.out.println(String.format("%d", pureLeft));
  22.         }
  23.  
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top