結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー qwrtpsfg
提出日時 2017-11-24 11:07:39
言語 C#(csc)
(csc 3.9.0)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 506 bytes
コンパイル時間 849 ms
コンパイル使用メモリ 109,360 KB
実行使用メモリ 932,240 KB
最終ジャッジ日時 2024-11-27 07:03:33
合計ジャッジ時間 13,607 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 28 TLE * 3 MLE * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

public class yukicoder
{
	
    public static void Main()
    {
		int n = int.Parse(Console.ReadLine());
		int[] array = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
		var MultipleList = new HashSet<int>();
		
		for(int i = 0; i < array.Length; i++)
		{
			for(int j = 1; j <= n / array[i]; j++)
			{
				MultipleList.Add(j * array[i]);
			}
			
		}
		
		Console.WriteLine(MultipleList.Count().ToString());

    }

}
0