結果

問題 No.442 和と積
ユーザー jousenjousen
提出日時 2016-11-11 22:32:24
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 840 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 106,868 KB
実行使用メモリ 24,084 KB
最終ジャッジ日時 2023-08-16 18:51:29
合計ジャッジ時間 4,210 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 58 ms
21,980 KB
testcase_02 AC 60 ms
21,792 KB
testcase_03 AC 58 ms
21,956 KB
testcase_04 WA -
testcase_05 AC 60 ms
23,916 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 57 ms
21,896 KB
testcase_10 WA -
testcase_11 AC 58 ms
21,864 KB
testcase_12 AC 59 ms
23,900 KB
testcase_13 AC 59 ms
21,948 KB
testcase_14 AC 61 ms
23,944 KB
testcase_15 AC 58 ms
23,908 KB
testcase_16 AC 57 ms
19,936 KB
testcase_17 AC 61 ms
21,804 KB
testcase_18 WA -
testcase_19 AC 58 ms
22,052 KB
testcase_20 AC 58 ms
21,936 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.Collections;
using System.Linq;
using System.Numerics;




namespace contest
{

    class contest
    {


        static void Main(string[] args)
        {


            //int n = int.Parse(Console.ReadLine());
            //var input = Console.ReadLine().Split().Select(int.Parse).ToArray();

            //var num = Console.ReadLine().Split().Select(int.Parse).ToArray();



             var input = Console.ReadLine().Split().Select(long.Parse).ToArray();
            long A = input[0];
            long B = input[1];

            Console.WriteLine(gcd(A,B));


           


        }

        public static long gcd(long a, long b)
        {
            if (a < b) return gcd(b,a);
            if (a % b == 0) return b;
            return gcd(b, a%b);

        }

    }


}
0