結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
masakt
|
| 提出日時 | 2017-03-19 11:15:06 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 670 bytes |
| コンパイル時間 | 2,568 ms |
| コンパイル使用メモリ | 107,708 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2024-07-23 04:06:53 |
| 合計ジャッジ時間 | 3,415 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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;
class P
{
static void Main()
{
int l = int.Parse(Console.ReadLine());
int m = int.Parse(Console.ReadLine());
int n = int.Parse(Console.ReadLine());
int s = (100 * l + 25 * m + 1 * n) % 1000;
l = 0;
m = 0;
n = 0;
while (0 < s)
{
if (100 <= s)
{
s -= 100;
l++;
}
else if (25 <= s)
{
s -= 25;
m++;
}
else
{
s--;
n++;
}
}
Console.WriteLine(l + m + n);
}
}
masakt