提交时间:2026-10-28 14:26:24
运行 ID: 43280
#include<bits/stdc++.h> #define int long long using namespace std; int n,s,cnt=0; bool check(int x){ int sum=0,y=x; while(y!=0){ sum+=(y%10); y/=10; } if((x-sum)>=s) return true; else return false; } signed main(){ cin>>n>>s; int i=s; for(;i<=n;i++){ if(check(i)) break; } if(check(i)==0)cout<<0*0*0*0*0*0*0*0*0*998244353<<endl; else cout<<n-i+1<<endl; return 0; }