题解:CF2132B The Secret Number
这篇题解如果过了就是我的第一篇题解,好激动啊啊啊啊啊
题目解读
其实翻译题目我们可以得知,
AC代码
#include<bits/stdc++.h>
#define zty_AK_codeforces_round_1043
#define hyc_qcz_jmr_baoyouwo_AC
#define int long long
#define made_by_ztyroy return 0;
#define rep(i,f,s) for(int i=f;i<=s;i++)
#define fep(i,f,s) for(int i=f;i<s;i++)
#define per(i,f,s) for(int i=f;i>=s;i--)
#define pef(i,f,s) for(int i=f;i>s;i--)
namespace FastIO{
template <typename T> inline void read(T &x){
x=0;
T f=1;
T c=getchar();
for(;!isdigit(c);c=getchar())if(c=='-')f=-1;
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
x*=f;
}
template <typename T> void print(T x){
if(x<0)x=-x,putchar('-');
if(x>9)print(x/10);
putchar((x%10)^48);
}
}
using namespace std;
using namespace FastIO;
stack<int>st;
int T,cnt,s;
void solve(){
read(s);
int cnt=10;
while(1){
if(cnt>=s){
break;
}
if(s%(cnt+1)==0){
st.push(s/(cnt+1));
}
cnt*=10;
}
print(st.size());
putchar('\n');
if(st.size()==0){
return ;
}
while(!st.empty()){
print(st.top());
putchar(' ');
st.pop();
}
putchar('\n');
}
signed main(){
zty_AK_codeforces_round_1043
hyc_qcz_jmr_baoyouwo_AC
read(T);
rep(i,1,T){
solve();
}
made_by_ztyroy
}