fork download
  1. f(n){return(pow(10,(int)log10(n)+1)*n+n)*n;}
  2.  
  3. int main(void)
  4. {
  5. while (1) {
  6. int n;
  7. if (scanf("%d", &n) != 1)
  8. break;
  9. printf("%d -> %d\n", n, f(n));
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 2116KB
stdin
1 2 3 4 10 174
stdout
1 -> 11
2 -> 44
3 -> 99
4 -> 176
10 -> 10100
174 -> 30306276