結果

問題 No.414 衝動
ユーザー mbanmban
提出日時 2016-10-12 03:53:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 657 bytes
コンパイル時間 1,083 ms
コンパイル使用メモリ 110,740 KB
実行使用メモリ 25,924 KB
最終ジャッジ日時 2024-04-27 08:27:39
合計ジャッジ時間 2,060 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
21,808 KB
testcase_01 AC 24 ms
23,792 KB
testcase_02 AC 24 ms
21,376 KB
testcase_03 AC 25 ms
25,924 KB
testcase_04 AC 28 ms
25,684 KB
testcase_05 AC 38 ms
23,664 KB
testcase_06 AC 36 ms
23,532 KB
testcase_07 AC 24 ms
23,792 KB
testcase_08 AC 36 ms
23,532 KB
testcase_09 AC 24 ms
23,512 KB
testcase_10 AC 27 ms
21,492 KB
testcase_11 AC 35 ms
23,664 KB
testcase_12 AC 36 ms
23,408 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;

class Magatro
{
static void Main()
    {
        long m = long.Parse(Console.ReadLine());

        int rootm;
        if (m > 1000000)
        {
            rootm = 1000000;
        }
        else
        {
            rootm = (int)m-1;
        }
        if (m == 1)
        {
            Console.WriteLine("1 1");
return;
        }
        for(int i = rootm; i >= 1; i--)
        {
            if (m % i == 0)
            {
                Console.WriteLine(i + " " + m / i);
                return;
            }
        }
    }
   

}


0