pastebin
Add a new paste
View all pastes
Change language
Dutch
English
French
Russian
menu
URL Shortener
Multiple URL shortener
browser info
Whois IP and domain lookup
Capture a Website screenshot
Disqus Chatroom
Registration
pastebin
Paste Search Dynamic
Recent pastes
Binance
3 hours ago
Jsonutility argumentexception
4 hours ago
base OnStartAuthority
4 hours ago
NetworkClient AddPlayer
4 hours ago
WebGL Failed to load resource
4 hours ago
Unity err memory
4 hours ago
Unity Package Cache error
4 hours ago
JNI Error
4 hours ago
GLFW Error
4 hours ago
Process crashed
4 hours ago
map to i
def
f
(
a,b,c
)
if
b<c
then
puts
b-a
+1
elsif
b<
2
*c
then
b2=b%c
a2=a%c
if
a2<=b2
then
puts
c
else
puts
b2+
(
c-a2
)
+1
end
else
puts
c
end
end
a,b,c=
gets
.
split
(
" "
)
.
map
{
|e| e.
to_i
}
a2=a%c
b2=b-
(
a-a2
)
f
(
a2,b2,c
)
Parsed in 0.005 seconds