結果
問題 |
No.442 和と積
|
ユーザー |
![]() |
提出日時 | 2016-11-11 23:29:55 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 546 bytes |
コンパイル時間 | 839 ms |
コンパイル使用メモリ | 110,712 KB |
実行使用メモリ | 26,796 KB |
最終ジャッジ日時 | 2024-11-25 09:32:16 |
合計ジャッジ時間 | 2,243 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static void Main() { string[] ab = Console.ReadLine().Split(' '); Array.Sort(ab); long A = long.Parse(ab[0]); long B = long.Parse(ab[1]); Console.WriteLine(G(A,B )); } static long G(long a,long b) { long r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } }