結果
問題 | No.586 ダブルブッキング |
ユーザー | Kaz_nl |
提出日時 | 2017-11-12 17:39:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 57 ms / 2,000 ms |
コード長 | 539 bytes |
コンパイル時間 | 1,996 ms |
コンパイル使用メモリ | 99,944 KB |
実行使用メモリ | 22,844 KB |
最終ジャッジ日時 | 2023-08-16 10:58:33 |
合計ジャッジ時間 | 3,247 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 55 ms
20,772 KB |
testcase_01 | AC | 56 ms
22,844 KB |
testcase_02 | AC | 57 ms
22,700 KB |
testcase_03 | AC | 55 ms
22,780 KB |
testcase_04 | AC | 55 ms
20,640 KB |
testcase_05 | AC | 55 ms
20,760 KB |
testcase_06 | AC | 54 ms
20,712 KB |
testcase_07 | AC | 54 ms
20,752 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; class Program { static void Main() { int ans = 0; int[] room = new int[1000]; int p1 = int.Parse(Console.ReadLine()); int p2 = int.Parse(Console.ReadLine()); int n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { int r = int.Parse(Console.ReadLine()); if (room[r] != 0) { ans += p1 + p2; } room[r]++; } Console.WriteLine(ans); } }