摘要: #include <stdio.h>int main() { int t,s,n,m; scanf("%d",&s); while(s--) { scanf("%d %d",&n,&m); t=0; for(;n>0;) { n=n/m; t+=n; } printf("%d\n",t); } } 阅读全文
posted @ 2018-05-21 10:45 崔杯杯 阅读(1904) 评论(0) 推荐(0)