結果

問題 No.1027 U+1F4A0
ユーザー htensai
提出日時 2020-05-13 11:20:58
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 2,014 ms
コンパイル使用メモリ 74,212 KB
実行使用メモリ 41,288 KB
最終ジャッジ日時 2024-09-14 15:29:07
合計ジャッジ時間 6,238 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int d1 = sc.nextInt();
		int d2 = sc.nextInt();
		int count;
		if (d1 * 2 < d2) { 
		    count = 0;
		} else if (d1 * 2 == d2) {
		    count = 4;
		} else if (d1 < d2) {
		    count = 8;
		} else if (d1 == d2) {
		    count = 4;
		} else {
		    count = 0;
		}
		System.out.println(count);
	}
}
0