Submission #23911277


Source Code Expand

import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long a = Long.parseLong(sc.next());
		long b = Long.parseLong(sc.next());

		// 確認
//		System.out.println(f(a, b, 4));
//		System.out.println(f(a, b, 100));
//		System.out.println(f(a, b, 400));

		System.out.println(f(a, b, 4) - f(a, b, 100) + f(a, b, 400));

	}

	static long f(long p, long q, long r) {
		long x = (p - 1) / r;
		long y = (q) / r;
		return y - x;
	}
}

Submission Info

Submission Time
Task C - 2月29日
User tobi00604
Language Java (OpenJDK 11.0.6)
Score 100
Code Size 524 Byte
Status AC
Exec Time 113 ms
Memory 35516 KiB

Judge Result

Set Name sub All
Score / Max Score 25 / 25 75 / 75
Status
AC × 10
AC × 22
Set Name Test Cases
sub test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_07A.txt, test_09A.txt, test_11A.txt, test_13A.txt, test_15A.txt
All sample_01.txt, sample_02.txt, sample_03.txt, test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_06.txt, test_07A.txt, test_08.txt, test_09A.txt, test_10.txt, test_11A.txt, test_12.txt, test_13A.txt, test_14.txt, test_15A.txt, test_16.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 113 ms 35360 KiB
sample_02.txt AC 107 ms 35432 KiB
sample_03.txt AC 104 ms 35444 KiB
test_01A.txt AC 106 ms 35460 KiB
test_02A.txt AC 110 ms 35396 KiB
test_03A.txt AC 98 ms 35432 KiB
test_04A.txt AC 106 ms 35512 KiB
test_05A.txt AC 97 ms 35424 KiB
test_06.txt AC 103 ms 35440 KiB
test_07A.txt AC 103 ms 35436 KiB
test_08.txt AC 101 ms 35316 KiB
test_09A.txt AC 111 ms 35348 KiB
test_10.txt AC 110 ms 35516 KiB
test_11A.txt AC 109 ms 35460 KiB
test_12.txt AC 108 ms 35280 KiB
test_13A.txt AC 110 ms 35232 KiB
test_14.txt AC 97 ms 35392 KiB
test_15A.txt AC 108 ms 35372 KiB
test_16.txt AC 100 ms 35452 KiB