結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
|
提出日時 | 2020-03-25 23:32:26 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 5,000 ms |
コード長 | 628 bytes |
コンパイル時間 | 2,033 ms |
コンパイル使用メモリ | 106,244 KB |
実行使用メモリ | 27,604 KB |
最終ジャッジ日時 | 2024-07-23 07:54:33 |
合計ジャッジ時間 | 1,782 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;using System.Linq;public class P0032 {public static void Main() {var l = int.Parse(Console.ReadLine().Trim());var m = int.Parse(Console.ReadLine().Trim());var n = int.Parse(Console.ReadLine().Trim());var total = 100*l + 25*m + n;var limit1000 = total / 1000;var limit100 = Math.Min(limit1000*10, (25*m + n) / 100);var limit25 = Math.Min(limit100*4, n / 25);var nUsed = limit25 * 25;var mUsed = limit100 * 4 - limit25;var lUsed = limit1000 * 10 - limit100;Console.WriteLine(l+m+n -lUsed-mUsed-nUsed);}}