Submission #48833015


Source Code Expand

a,m,l,r = gets.split(" ").map(&:to_i)
left = (l-a).ceildiv(m)
right = (r-a).div(m)
d = [right - left + 1, 0].max
puts("#{d}")

Submission Info

Submission Time
Task B - Christmas Trees
User zettsut
Language Ruby (ruby 3.2.2)
Score 250
Code Size 131 Byte
Status AC
Exec Time 135 ms
Memory 17324 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 20
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 02_random2_08.txt, 03_minmax_00.txt, 03_minmax_01.txt, 04_handmade_00.txt, 04_handmade_01.txt, 04_handmade_02.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 135 ms 17032 KiB
00_sample_01.txt AC 43 ms 17184 KiB
00_sample_02.txt AC 43 ms 17060 KiB
01_random_00.txt AC 44 ms 17324 KiB
01_random_01.txt AC 45 ms 17140 KiB
01_random_02.txt AC 44 ms 17104 KiB
02_random2_00.txt AC 43 ms 17132 KiB
02_random2_01.txt AC 43 ms 17144 KiB
02_random2_02.txt AC 43 ms 17224 KiB
02_random2_03.txt AC 42 ms 16812 KiB
02_random2_04.txt AC 43 ms 17056 KiB
02_random2_05.txt AC 44 ms 17156 KiB
02_random2_06.txt AC 43 ms 17196 KiB
02_random2_07.txt AC 43 ms 17108 KiB
02_random2_08.txt AC 44 ms 17184 KiB
03_minmax_00.txt AC 44 ms 17156 KiB
03_minmax_01.txt AC 43 ms 17256 KiB
04_handmade_00.txt AC 43 ms 17120 KiB
04_handmade_01.txt AC 43 ms 16872 KiB
04_handmade_02.txt AC 44 ms 17252 KiB