結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
ixTL255
|
| 提出日時 | 2016-09-07 20:14:53 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 1,000 ms |
| コード長 | 375 bytes |
| コンパイル時間 | 802 ms |
| コンパイル使用メモリ | 109,100 KB |
| 実行使用メモリ | 27,416 KB |
| 最終ジャッジ日時 | 2024-11-18 14:48:04 |
| 合計ジャッジ時間 | 2,365 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
コンパイルメッセージ
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;
public class Test
{
public static void Main()
{
var nd = Console.ReadLine()
.Split(' ')
.Select(x => int.Parse(x))
.ToList();
Console.WriteLine(nd[0] / GCD(nd[0], nd[1]) - 1);
}
public static int GCD(int a, int b)
{
if(a % b == 0) return b;
else return GCD(b, a % b);
}
}
ixTL255