結果

問題 No.442 和と積
ユーザー AreTrashAreTrash
提出日時 2016-11-11 23:46:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 1,000 ms
コード長 433 bytes
コンパイル時間 2,044 ms
コンパイル使用メモリ 103,252 KB
実行使用メモリ 23,076 KB
最終ジャッジ日時 2023-09-18 06:22:32
合計ジャッジ時間 4,314 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
20,944 KB
testcase_01 AC 63 ms
20,908 KB
testcase_02 AC 63 ms
20,840 KB
testcase_03 AC 64 ms
20,852 KB
testcase_04 AC 64 ms
22,884 KB
testcase_05 AC 64 ms
21,004 KB
testcase_06 AC 63 ms
20,960 KB
testcase_07 AC 64 ms
21,072 KB
testcase_08 AC 63 ms
18,880 KB
testcase_09 AC 66 ms
23,076 KB
testcase_10 AC 63 ms
20,940 KB
testcase_11 AC 65 ms
20,964 KB
testcase_12 AC 65 ms
20,920 KB
testcase_13 AC 65 ms
20,912 KB
testcase_14 AC 65 ms
21,004 KB
testcase_15 AC 67 ms
22,908 KB
testcase_16 AC 64 ms
20,892 KB
testcase_17 AC 64 ms
21,012 KB
testcase_18 AC 64 ms
20,840 KB
testcase_19 AC 64 ms
20,912 KB
testcase_20 AC 66 ms
22,920 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.Numerics;

namespace No442{
    public class Program{
        public static void Main(string[] args){
            Func<BigInteger, BigInteger, BigInteger> Gcd = null;
            Gcd = (a, b) => b == 0 ? a : Gcd(b, a % b);
            var input = Array.ConvertAll(Console.ReadLine().Split(), BigInteger.Parse);
            Console.WriteLine(Gcd(input[0] + input[1], input[0] * input[1]));
        }
    }
}
0