1.
#include <iostream>
using namespace std;
int main()
{
unsigned int N, p=1, s=0;
cin>>N;
if (N!=0)
{
while (N!=0)
{
if (N%10!=0)
{
s += N%10*p;
p *= 10;
}
N /= 10;
}
cout<<s;
}
return 0;
}
2.
#include <iostream>
using namespace std;
int main ()
{
int N, k, i;
cin>>N>>k;
for (i=N; i>=0; i--)
if (i%k==0)
cout<<i<<' ';
return 0;
}