結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
![]() |
提出日時 | 2019-08-08 18:10:33 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 5,000 ms |
コード長 | 1,143 bytes |
コンパイル時間 | 846 ms |
コンパイル使用メモリ | 110,824 KB |
実行使用メモリ | 25,928 KB |
最終ジャッジ日時 | 2024-07-23 07:36:40 |
合計ジャッジ時間 | 1,709 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 競プロ{class Program{static void Main(string[] args){string s = Console.ReadLine();Count100 = int.Parse(s);s = Console.ReadLine();Count25 = int.Parse(s);s = Console.ReadLine();Count1 = int.Parse(s);Count1000 = 0;// 1円 → 25円while (Count1 >= 25){Count1 -= 25;Count25++;}// 25円 → 100円while (Count25 >= 4){Count25 -= 4;Count100++;}// 100円 → 1000円while (Count100 >= 10){Count100 -= 10;Count1000++;}int res = Count1 + Count25 + Count100;Console.WriteLine(res.ToString());Console.ReadLine();}private static int Count1, Count25, Count100, Count1000;}}