Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $a = readline();
- $b = readline();
- $c = readline();
- $questions = readline();
- $answers = $a + $b + $c;
- $hours = ceil($questions/$answers);
- $hours += floor($hours / 3);
- if($hours%4==0&&$hours>1){
- $hours--;
- }
- echo "Time needed: {$hours}h.";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement