結果

問題 No.537 ユーザーID
ユーザー くれちーくれちー
提出日時 2017-07-01 01:01:48
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 2,152 bytes
コンパイル時間 983 ms
コンパイル使用メモリ 115,972 KB
実行使用メモリ 40,756 KB
最終ジャッジ日時 2024-04-15 07:45:18
合計ジャッジ時間 5,282 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
33,548 KB
testcase_01 AC 37 ms
26,872 KB
testcase_02 AC 38 ms
28,772 KB
testcase_03 AC 38 ms
26,724 KB
testcase_04 AC 38 ms
28,380 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 38 ms
26,416 KB
testcase_08 AC 39 ms
28,772 KB
testcase_09 AC 36 ms
26,480 KB
testcase_10 AC 38 ms
26,380 KB
testcase_11 AC 37 ms
26,288 KB
testcase_12 AC 38 ms
24,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 38 ms
26,728 KB
testcase_16 AC 39 ms
28,388 KB
testcase_17 WA -
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

#pragma warning disable IDE0011
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using static System.Convert;
using static System.Math;
using static Extentions;

class IO
{
    int idx;
    string[] line;

    public void R(params char[] sep) { line = Console.ReadLine().Split(sep); idx = 0; }
    public string S => line[idx++];
    public string[] Ss => line.Skip(idx++).ToArray();
    public char C => char.Parse(line[idx++]);
    public char[] Cs => line.Skip(idx++).Select(char.Parse).ToArray();
    public int I => int.Parse(line[idx++]);
    public int[] Is => line.Skip(idx++).Select(int.Parse).ToArray();
    public long L => long.Parse(line[idx++]);
    public long[] Ls => line.Skip(idx++).Select(long.Parse).ToArray();
    public double F => double.Parse(line[idx++]);
    public double[] Fs => line.Skip(idx++).Select(double.Parse).ToArray();
    public decimal D => decimal.Parse(line[idx++]);
    public decimal[] Ds => line.Skip(idx++).Select(decimal.Parse).ToArray();
    public BigInteger B => BigInteger.Parse(line[idx++]);
    public BigInteger[] Bs => line.Skip(idx++).Select(BigInteger.Parse).ToArray();

    public void Write(params object[] xs)
    {
        Console.Write(xs.First());
        foreach (var x in xs.Skip(1)) Console.Write(" " + x);
        Console.WriteLine();
    }
}

static class Extentions
{
    public static string FromCharsToString(this IEnumerable<char> seq)
    {
        return new string(seq.ToArray());
    }
}

static class Program
{
    static void Main()
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        Solve(new IO());
        Console.Out.Flush();
    }

    static void Solve(IO io)
    {
        io.R();
        var n = io.L;

        var set = new HashSet<string>();

        for (var i = 1L; i * i <= n; i++)
        {
            if (n % i == 0) set.Add((n / i).ToString() + i);
            var tmp = new HashSet<string>(set.Select(s => s.Reverse().FromCharsToString()));
            foreach (var item in tmp) set.Add(item);
        }
 
        io.Write(set.Count);
    }
}
0