結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-09-05 16:13:22 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 784 bytes |
コンパイル時間 | 962 ms |
コンパイル使用メモリ | 103,936 KB |
実行使用メモリ | 23,040 KB |
最終ジャッジ日時 | 2024-11-06 22:19:49 |
合計ジャッジ時間 | 5,182 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 2 TLE * 1 -- * 16 |
コンパイルメッセージ
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;using System.Text;using System.Threading.Tasks;namespace yukicorder537{class Program{static void Main(string[] args){// 入力long N = long.Parse(Console.ReadLine());// 割れる組み合わせの確認var ans = divPattern(N);Console.WriteLine(ans);Console.ReadKey();}static long divPattern(long N){var max = N / 2;List<string> ans = new List<string>();ans.Add(string.Format("{0}{1}" , 1 , N));ans.Add(string.Format("{1}{0}" , 1 , N));for (var i = 2; i <= max; i++){if (N % i == 0){string x = i + (N / i).ToString();if (ans.Contains(x) == false){ans.Add(x);}}}return ans.Count;}}}