Cod sursa(job #2279290)
| Utilizator | Data | 9 noiembrie 2018 12:07:15 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <iostream>
using namespace std;
int main()
{
int n,z,p,c;
cin>>n;
z=0;
p=1;
while(n>0)
{
c=n%10;
n=n/10;
if(c%3==0)
{
z=z+p*(9-c);
p=p*10;
}
}
cout<<z;
}
