結果

問題 No.237 作図可能性
ユーザー mbanmban
提出日時 2017-01-13 10:54:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 1,947 bytes
コンパイル時間 2,302 ms
コンパイル使用メモリ 104,736 KB
実行使用メモリ 22,884 KB
最終ジャッジ日時 2023-08-23 09:58:01
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,904 KB
testcase_01 AC 56 ms
20,608 KB
testcase_02 AC 57 ms
22,840 KB
testcase_03 AC 56 ms
20,860 KB
testcase_04 AC 56 ms
20,872 KB
testcase_05 AC 55 ms
20,840 KB
testcase_06 AC 56 ms
20,912 KB
testcase_07 AC 56 ms
20,804 KB
testcase_08 AC 55 ms
20,856 KB
testcase_09 AC 57 ms
20,848 KB
testcase_10 AC 57 ms
22,828 KB
testcase_11 AC 56 ms
20,772 KB
testcase_12 AC 58 ms
20,820 KB
testcase_13 AC 56 ms
20,772 KB
testcase_14 AC 56 ms
20,848 KB
testcase_15 AC 56 ms
20,760 KB
testcase_16 AC 56 ms
20,852 KB
testcase_17 AC 56 ms
22,708 KB
testcase_18 AC 58 ms
20,800 KB
testcase_19 AC 56 ms
20,872 KB
testcase_20 AC 57 ms
22,884 KB
testcase_21 AC 56 ms
22,788 KB
testcase_22 AC 57 ms
22,668 KB
testcase_23 AC 55 ms
20,724 KB
testcase_24 AC 57 ms
18,736 KB
testcase_25 AC 56 ms
20,752 KB
testcase_26 AC 55 ms
20,776 KB
testcase_27 AC 56 ms
20,836 KB
testcase_28 AC 56 ms
20,784 KB
testcase_29 AC 57 ms
20,744 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using System.IO;

class Program
{
    static private Magatro M = new Magatro();
    static private void Main(string[]args)
    {
        M.Scan();
        M.Solve();
    }
}

public class Scanner
{
    private string[] S;
    private int Index;
    private char Separator;

    public Scanner(char separator = ' ')
    {
        Index = 0;
        Separator = separator;
        S = new string[0];
    }

    private string[] Line()
    {
        return Console.ReadLine().Split(Separator);
    }

    public string Next()
    {
        string result;
        if (Index >= S.Length)
        {
            S = Line();
            Index = 0;
        }
        result = S[Index];
        Index++;
        return result;
    }
    public int NextInt()
    {
        return int.Parse(Next());
    }
    public double NextDouble()
    {
        return double.Parse(Next());
    }
    public long NextLong()
    {
        return long.Parse(Next());
    }
}

public class Magatro
{
    private int A;
    readonly long[] F = new long[] { 3, 5, 17, 257, 65537 };

    public void Scan()
    {
        Scanner sc = new Scanner();
        A = sc.NextInt();
    }

    public void Solve()
    {
        int cnt = 0;
        int loop = 1 << 5;
        for(int i = 0; i < loop; i++)
        {
            int cp = i;
            long s = 1;
            for(int j = 0; j < 5; j++)
            {
                if (cp % 2 == 1)
                {
                    s *= F[j];
                }
                cp /= 2;
            }
            for(int j = 1; true; j *= 2)
            {

                if (A < s * j)
                {
                    break;
                }
                cnt++;
            }
        }
        Console.WriteLine(cnt-2);
    }

}
0