結果

問題 No.131 マンハッタン距離
ユーザー kanra661kanra661
提出日時 2015-01-20 23:49:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 3,190 ms
コンパイル使用メモリ 71,912 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-05 02:34:44
合計ジャッジ時間 10,942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,792 KB
testcase_01 WA -
testcase_02 AC 123 ms
55,464 KB
testcase_03 AC 237 ms
56,196 KB
testcase_04 AC 205 ms
55,816 KB
testcase_05 AC 185 ms
55,812 KB
testcase_06 AC 136 ms
55,760 KB
testcase_07 AC 121 ms
55,784 KB
testcase_08 AC 119 ms
55,608 KB
testcase_09 AC 123 ms
55,560 KB
testcase_10 AC 126 ms
55,976 KB
testcase_11 AC 124 ms
55,580 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 120 ms
55,736 KB
testcase_15 AC 119 ms
55,740 KB
testcase_16 AC 119 ms
55,796 KB
testcase_17 WA -
testcase_18 AC 128 ms
55,724 KB
testcase_19 AC 119 ms
55,688 KB
testcase_20 AC 123 ms
55,764 KB
testcase_21 AC 123 ms
56,052 KB
testcase_22 AC 122 ms
55,536 KB
testcase_23 AC 868 ms
56,032 KB
testcase_24 WA -
testcase_25 AC 866 ms
55,796 KB
testcase_26 AC 866 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No_103 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		for (int i = 0; i <= x; i++) {
			int dis = d -i;
			if(dis <= y) count+=1;
		}
		System.out.println(count);
	}
}
0