fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int q, a, b=0;
  5. scanf("%d", &a);
  6. while(a!=0){
  7. a=a/10;
  8. b=b+1;
  9. }
  10. for(q=0;q<b;q++){
  11. a=a%b;
  12. }
  13. printf("%d", a);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5288KB
stdin
1995
stdout
Standard output is empty