Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
sivan_iut
Feb 29th, 2020
51
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C
0.27 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include<stdio.h>
int
main
(
)
{
int
n
,
k
;
scanf
(
"%d%d"
,&
n
,&
k
)
;
int
c
=
0
;
while
(
n
!=
0
)
{
n
=
n
-
1
;
c
++;
while
(
n
%
k
==
0
)
{
c
++;
n
=
n
/
k
;
}
}
printf
(
"%d"
,
c
)
;
return
0
;
}
Add Comment
Please,
Sign In
to add comment
Public Pastes
🤑G2A.com Free Gift Card Guide June 2024 Fix🤑
JavaScript | 3 min ago | 0.34 KB
🤑 G2A.com Free Gift Card Guide Jun 2024 FIX 🤑
GetText | 3 min ago | 0.39 KB
🤑G2A.com Free Gift Card Guide June 2024 Fix🤑
JavaScript | 9 min ago | 0.34 KB
RAII-UniquePtr
C++ | 10 min ago | 1.01 KB
blog_forms
Python | 10 min ago | 0.55 KB
blog_models
Python | 11 min ago | 3.24 KB
blog_urls
Python | 12 min ago | 1.27 KB
blog_views
Python | 12 min ago | 6.09 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!