結果
| 問題 | No.442 和と積 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-07-28 14:36:46 | 
| 言語 | C# (.NET 8.0.404) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 496 bytes | 
| コンパイル時間 | 13,039 ms | 
| コンパイル使用メモリ | 168,392 KB | 
| 実行使用メモリ | 186,112 KB | 
| 最終ジャッジ日時 | 2024-10-06 05:53:45 | 
| 合計ジャッジ時間 | 14,670 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 WA * 7 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (85 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace yukicoder
{
	public class Program
	{
		public static long X;
		public static void Main()
		{
			var a = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
			Euclid(a[0] , a[1]);
			Console.WriteLine(X);
		}
		static void Euclid(long a, long b)
		{
			var c = Math.Max(a, b);
			var d = Math.Min(a, b);
			var e = c % d;
			if (e > 0)
			{
				Euclid(e, d);
			}
			else
			{
				X = d;
			}
		}
	}
}
            
            
            
        