SHARE
TWEET

Untitled

a guest May 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Main
  5. {
  6.    public static void main(String[] args)
  7.    {
  8.       Scanner in = new Scanner(System.in);
  9.  
  10.       double firstDay = in.nextInt();
  11.       double goal = in.nextInt();
  12.      
  13.       double done = firstDay;
  14.       int days = 1;
  15.       while (done <= goal) {
  16.           done += (done / 10) * 7;
  17.           days++;
  18.       }
  19.  
  20.       System.out.print(days - 1);
  21.    }
  22. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top