Submission #12680252


Source Code Expand

Copy
a, b, n = gets.split.map(&:to_i)
x = (b - 1) >= n ? n : b - 1

puts (a * x / b).floor

Submission Info

Submission Time
Task D - Floor Function
User cheezenaan
Language Ruby (2.7.1)
Score 400
Code Size 90 Byte
Status
Exec Time 54 ms
Memory 14324 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 01.txt, 02.txt
All 400 / 400 01.txt, 02.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt
Case Name Status Exec Time Memory
01.txt 51 ms 14084 KB
02.txt 53 ms 14132 KB
11.txt 50 ms 14248 KB
12.txt 52 ms 14160 KB
13.txt 51 ms 14172 KB
14.txt 54 ms 14192 KB
15.txt 54 ms 14020 KB
16.txt 52 ms 14192 KB
17.txt 50 ms 14324 KB
18.txt 54 ms 14044 KB