結果

問題 No.3008 某マヨネーズの網目柄
ユーザー uafr_csuafr_cs
提出日時 2015-08-12 00:26:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 2,148 ms
コンパイル使用メモリ 73,020 KB
実行使用メモリ 57,872 KB
最終ジャッジ日時 2023-09-25 08:15:15
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
55,588 KB
testcase_01 AC 131 ms
39,436 KB
testcase_02 AC 133 ms
39,532 KB
testcase_03 WA -
testcase_04 AC 129 ms
39,948 KB
testcase_05 AC 130 ms
39,160 KB
testcase_06 AC 129 ms
39,096 KB
testcase_07 WA -
testcase_08 AC 131 ms
39,680 KB
testcase_09 AC 132 ms
39,428 KB
testcase_10 WA -
testcase_11 AC 132 ms
39,904 KB
testcase_12 AC 130 ms
38,916 KB
testcase_13 WA -
testcase_14 AC 131 ms
39,844 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 129 ms
39,280 KB
testcase_18 AC 131 ms
39,612 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 127 ms
39,640 KB
testcase_22 AC 130 ms
39,448 KB
権限があれば一括ダウンロードができます

ソースコード

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 void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		final int M = sc.nextInt();
		
		final int min = Math.min(N, M);
		final int max = Math.max(N, M);
		
		if(min % 2 == max % 2){
			System.out.println(min);
		}else{
			System.out.println(1);
		}
		
	}
	
}
0