結果
問題 |
No.810 割った余りの個数
|
ユーザー |
|
提出日時 | 2019-04-19 22:07:49 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 719 bytes |
コンパイル時間 | 806 ms |
コンパイル使用メモリ | 110,784 KB |
実行使用メモリ | 825,816 KB |
最終ジャッジ日時 | 2024-09-22 20:08:14 |
合計ジャッジ時間 | 5,316 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 MLE * 1 -- * 9 |
コンパイルメッセージ
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; // No.810 割った余りの個数 namespace No._810 { class Program { static void Main(string[] args) { int L, R, M; int[] p = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); L = p[0]; R = p[1]; M = p[2]; var dic = new Dictionary<int, int>(); int div; for (int i = L; i <= R; i++) { div = i % M; if (!dic.ContainsKey(div)) { dic.Add(div, 0); } } Console.WriteLine(dic.Count()); } } }