Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream fin("codjoc.in");
- ofstream fout("codjoc.out");
- long long int n,c,s,p=10;
- int main()
- {
- fin>> n;
- s=n;
- while(p<=n)
- {
- s=s+n%p;
- p=p*10;
- }
- fout<<s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement