题解 | #牛牛的digit#
牛牛的digit
https://www.nowcoder.com/practice/21b49f1f495f4280b8a96c415deaa3c4
#include <stdio.h>
void dight(int x,int i)
{
int n = 1;
while (i) {
i--;
n = n*10;
}
printf("%d\n",x%n);
}
int main()
{
int x,i;
scanf("%d %d",&x,&i);
dight(x,i);
return 0;
}
字节跳动公司福利 1297人发布