結果

問題 No.8008 某マヨネーズの網目柄
ユーザー uafr_cs
提出日時 2015-08-12 00:41:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 477 bytes
コンパイル時間 2,037 ms
コンパイル使用メモリ 75,372 KB
実行使用メモリ 41,700 KB
最終ジャッジ日時 2024-07-18 06:48:00
合計ジャッジ時間 5,156 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {
	
	public static long gcd(long a, long b){
		return b == 0 ? a : gcd(b, a % b);
	}
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		final int M = sc.nextInt();
		
		System.out.println(gcd(N, M));
	}
	
}
0