結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2017-09-11 21:11:20 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 762 bytes |
コンパイル時間 | 842 ms |
コンパイル使用メモリ | 103,296 KB |
実行使用メモリ | 18,304 KB |
最終ジャッジ日時 | 2024-11-07 17:05:08 |
合計ジャッジ時間 | 1,928 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 3 |
コンパイルメッセージ
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; class Program { static void Main() { var input1 = Console.ReadLine(); var input2 = Console.ReadLine(); var s_input1 = input1.Split(' '); var s_input2 = input2.Split(' '); // 1袋あたりの粒 int K = Convert.ToInt32(s_input1[0]); // 袋の数 int N = Convert.ToInt32(s_input1[1]); // 家族の人数 int F = Convert.ToInt32(s_input1[2]); // 各年齢 var A = new List<int>(); int mameSum = K * N; int ageSum = 0; foreach (var str in s_input2) { ageSum += Convert.ToInt32(str); } Console.WriteLine(mameSum - ageSum); } }