题解 | #牛牛的digit#
牛牛的digit
https://www.nowcoder.com/practice/21b49f1f495f4280b8a96c415deaa3c4
#include<stdio.h> int digit(int x,int i) { if(i==0) { return 0; } else return digit(x/10,i-1)*10+x%10; } int main() { int x,i; scanf("%d %d",&x,&i); printf("%d",digit(x,i)); return 0; }