結果

問題 No.414 衝動
ユーザー jousenjousen
提出日時 2016-08-27 11:05:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 714 bytes
コンパイル時間 699 ms
コンパイル使用メモリ 109,596 KB
実行使用メモリ 26,816 KB
最終ジャッジ日時 2024-04-27 08:22:56
合計ジャッジ時間 1,678 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
26,688 KB
testcase_01 AC 21 ms
24,312 KB
testcase_02 AC 21 ms
24,644 KB
testcase_03 AC 32 ms
24,540 KB
testcase_04 AC 22 ms
24,752 KB
testcase_05 AC 32 ms
24,516 KB
testcase_06 AC 32 ms
24,620 KB
testcase_07 AC 21 ms
26,556 KB
testcase_08 AC 27 ms
26,816 KB
testcase_09 AC 31 ms
22,712 KB
testcase_10 AC 21 ms
24,516 KB
testcase_11 AC 21 ms
24,412 KB
testcase_12 AC 22 ms
24,748 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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace tes
{
	class contest
	{
		static void Main(string[] args)
		{
			long num = long.Parse(Console.ReadLine());
            long tmp = (long)Math.Sqrt(num);
            var list = new List<long>();

            for (int i = 2; i <= tmp; i++)
            {
                if (num % i == 0)
                {
                    list.Add(i);
                    list.Add(num / i);
                    break;
                }
            }
            if (list.Count() == 0) Console.WriteLine(1 + " " + num / 1);
            else Console.WriteLine(list[0]+" "+list[1]);
            
		}

	}
}
0