結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
|
提出日時 | 2017-09-25 16:14:49 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 475 bytes |
コンパイル時間 | 2,024 ms |
コンパイル使用メモリ | 108,784 KB |
実行使用メモリ | 25,812 KB |
最終ジャッジ日時 | 2024-07-23 06:45:11 |
合計ジャッジ時間 | 2,831 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;public class Program {public static void Main(string[] args){int count = 0;int l = int.Parse(Console.ReadLine());int m = int.Parse(Console.ReadLine());int n = int.Parse(Console.ReadLine());int[] coins = {100, 25, 1};int money = l * coins[0] + m * coins[1] + n * coins[2];money %= 1000;for (int i = 0; i < coins.Length; i++) {count += money / coins[i];money %= coins[i];}count += money;Console.WriteLine(count);}}