Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Perter Smoke
ismail5g
Mar 24th, 2018
107
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C
0.25 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include<stdio.h>
int
main
(
)
{
int
n
,
p
,
k
,
l
;
while
(
scanf
(
"%d %d"
,
&
n
,
&
k
)
!=
EOF
)
{
p
=
0
;
l
=
n
;
while
(
k
<=
n
)
{
n
=
n
/
k
;
p
+=
n
;
}
printf
(
"%d
\n
"
,
l
+
p
)
;
}
return
0
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
SmartOS Zombie Zone Cleanup Script
Bash | 2 hours ago | 3.78 KB
Untitled
3 hours ago | 3.86 KB
Decentralized Money
3 hours ago | 0.42 KB
Change your mindset
3 hours ago | 0.08 KB
𝘉𝘐𝘗𝟥𝟤 𝘢𝘯𝘥 𝘉𝘐𝘗𝟦𝟦
4 hours ago | 2.01 KB
𝘌𝘵𝘩𝘦𝘳𝘦𝘶𝘮
4 hours ago | 1.64 KB
Bitcoin
5 hours ago | 0.23 KB
BIP32
6 hours ago | 0.35 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!