提出 #23911277
ソースコード 拡げる
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;
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - 2月29日 |
| ユーザ | tobi00604 |
| 言語 | Java (OpenJDK 11.0.6) |
| 得点 | 100 |
| コード長 | 524 Byte |
| 結果 | AC |
| 実行時間 | 113 ms |
| メモリ | 35516 KiB |
ジャッジ結果
| セット名 | sub | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 25 / 25 | 75 / 75 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 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 |