結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-06-20 17:52:40 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 1,052 bytes |
| コンパイル時間 | 3,791 ms |
| コンパイル使用メモリ | 108,068 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2024-07-23 07:34:22 |
| 合計ジャッジ時間 | 1,737 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 yukicoderTest
{
class Program
{
static void Main(string[] args)
{
int thousand = 0;
int hundred = 0;
int twentyfive = 0;
int one = 0;
string l = Console.ReadLine();
hundred = int.Parse(l);
string m = Console.ReadLine();
twentyfive = int.Parse(m);
string n = Console.ReadLine();
one = int.Parse(n);
while(one>=25)
{
twentyfive++;
one = one - 25;
}
while(twentyfive>=4)
{
hundred++;
twentyfive = twentyfive - 4;
}
while(hundred>=10)
{
thousand++;
hundred = hundred - 10;
}
int ans = one + twentyfive + hundred ;
Console.WriteLine(ans);
}
}
}
funakoshi