結果

問題 No.1157 Many Quotients easy
ユーザー bluemeganebluemegane
提出日時 2020-09-08 07:24:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 1,131 ms
コンパイル使用メモリ 67,460 KB
実行使用メモリ 26,416 KB
最終ジャッジ日時 2023-08-19 17:32:14
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
22,352 KB
testcase_01 AC 51 ms
22,400 KB
testcase_02 AC 50 ms
24,544 KB
testcase_03 AC 52 ms
24,412 KB
testcase_04 AC 52 ms
24,448 KB
testcase_05 AC 51 ms
24,504 KB
testcase_06 AC 51 ms
22,404 KB
testcase_07 AC 50 ms
22,444 KB
testcase_08 AC 52 ms
22,408 KB
testcase_09 AC 52 ms
24,500 KB
testcase_10 AC 53 ms
24,524 KB
testcase_11 AC 54 ms
22,472 KB
testcase_12 AC 53 ms
22,404 KB
testcase_13 AC 54 ms
24,372 KB
testcase_14 AC 53 ms
22,328 KB
testcase_15 AC 53 ms
22,376 KB
testcase_16 AC 55 ms
26,416 KB
testcase_17 AC 54 ms
22,416 KB
testcase_18 AC 53 ms
24,432 KB
testcase_19 AC 52 ms
22,368 KB
testcase_20 AC 52 ms
22,312 KB
testcase_21 AC 50 ms
22,448 KB
testcase_22 AC 52 ms
24,572 KB
testcase_23 AC 55 ms
22,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(int n)
    {
        var hs = new HashSet<int>();
        for (int i = 1; i <= n; i++) hs.Add(n / i);
        Console.WriteLine(hs.Count());
    }
}
0