結果
| 問題 | 
                            No.1057 素敵な日
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ks2m
                         | 
                    
| 提出日時 | 2020-05-22 21:23:23 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 129 ms / 2,000 ms | 
| コード長 | 321 bytes | 
| コンパイル時間 | 2,040 ms | 
| コンパイル使用メモリ | 77,224 KB | 
| 実行使用メモリ | 54,212 KB | 
| 最終ジャッジ日時 | 2024-10-05 14:40:30 | 
| 合計ジャッジ時間 | 3,638 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 7 | 
ソースコード
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();
		if (a == b) {
			System.out.println(a + b - 1);
		} else {
			System.out.println(Math.min(a, b) * 2);
		}
	}
}
            
            
            
        
            
ks2m