結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
nattoumaru
|
| 提出日時 | 2018-02-28 20:16:55 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 702 bytes |
| コンパイル時間 | 1,056 ms |
| コンパイル使用メモリ | 104,448 KB |
| 実行使用メモリ | 18,560 KB |
| 最終ジャッジ日時 | 2024-12-21 14:46:46 |
| 合計ジャッジ時間 | 1,703 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 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 programPractice
{
class Program
{
public static void Main(string[] args)
{
int[] num = Console.ReadLine().Split().Select(int.Parse).ToArray();
int sum = num[0] * 100 + num[1] * 25 + num[2] * 1;
int nPaper = sum / 1000;
int cSum = sum - 1000 * nPaper;
int n100 = cSum / 100;
int cSum2 = cSum - n100 * 100;
int n25 = cSum2 / 25;
int n1 = cSum2 - n25 * 25;
int nCoin = n100 + n25 + n1;
Console.WriteLine(nCoin);
}
}
}
nattoumaru