結果

問題 No.136 Yet Another GCD Problem
ユーザー nanophoto12nanophoto12
提出日時 2015-01-28 01:01:30
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 549 bytes
コンパイル時間 4,456 ms
コンパイル使用メモリ 101,692 KB
実行使用メモリ 26,064 KB
最終ジャッジ日時 2023-09-05 07:11:22
合計ジャッジ時間 8,499 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 61 ms
21,896 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 60 ms
21,956 KB
testcase_09 AC 61 ms
21,956 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 60 ms
22,020 KB
testcase_23 AC 59 ms
21,824 KB
testcase_24 AC 60 ms
21,792 KB
testcase_25 AC 60 ms
19,840 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 62 ms
21,816 KB
testcase_31 AC 61 ms
21,904 KB
testcase_32 AC 60 ms
19,828 KB
testcase_33 AC 61 ms
23,828 KB
testcase_34 AC 60 ms
21,964 KB
testcase_35 AC 60 ms
21,856 KB
testcase_36 AC 61 ms
22,004 KB
testcase_37 AC 60 ms
21,780 KB
testcase_38 WA -
testcase_39 AC 60 ms
19,892 KB
testcase_40 WA -
testcase_41 AC 60 ms
21,884 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;

namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var n = line[0];
            var max = 1;
            for (int i = 1; i < Math.Sqrt(n)+1; i++)
            {
                if (n%i == 0)
                {
                    max = i;
                }
            }
            Console.WriteLine(max);
        }
    }
}
0