package yukicoder; import java.util.Scanner; public class Yukicoder { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int one = sc.nextInt();// 1円硬貨枚数 int twentyFive = sc.nextInt();// 25円硬貨枚数 int hundred = sc.nextInt();// 100円硬貨枚数 sc.close(); int totalCoin = 0;// 硬貨の合計枚数 // 両替処理開始 totalCoin = hundred / 25; hundred -= totalCoin * 25; twentyFive += totalCoin; totalCoin = 0; totalCoin = twentyFive / 4; twentyFive -= totalCoin * 4; one += totalCoin; totalCoin = 0; totalCoin = one / 10; one -= totalCoin * 10; totalCoin = one + twentyFive + hundred; System.out.println(totalCoin); } }