Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MAin {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt();
- int paricki = 0;
- paricki += (n / 50);
- n = n - (50 * (n / 50));
- paricki += (n / 10);
- n = n - (10 * (n / 10));
- paricki += (n / 5);
- n = n - (5 * (n / 5));
- paricki += (n / 2);
- n = n - (2 * (n / 2));
- paricki += n;
- System.out.println(paricki);
- }
- }
- // 158
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement