Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class DataTypeSpiceMustFlow {
- public static void main(String[] args) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- int spice = Integer.parseInt(reader.readLine());
- int daysCount = 0;
- int workersConsume = 0;
- int totalSpice = 0;
- while (spice >= 100){
- daysCount++;
- workersConsume = spice - 26;
- totalSpice += workersConsume;
- spice -= 10;
- }
- totalSpice -= 26;
- System.out.println(daysCount);
- System.out.println(totalSpice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement