| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 90421 | sh25_zhangyj | 阶乘数码 | C++ | Accepted | 0 MS | 256 KB | 361 | 2026-06-05 15:37:30 |
#include<bits/stdc++.h> using namespace std; int jc(int n){ if(n==1) return 1; else return n*jc(n-1); }int main(){ int t,n,a,s,m=0; cin>>t; for(int i=1;i<=t;++i){ cin>>n>>a; s=jc(n); while(s!=0){ if(s%10==a) m=m+1; s=s/10; }cout<<m<<endl; m=0; }return 0; }