摘要:
#include<iostream>#include<cstdio>using namespace std;int n;long long int q[9999999];void BFS(){ int front,rear; front=rear=0; q[rear]=1; rear++; long long int top; while(rear>front) { top = q[front]; if(top%n==0){ break; } top *= 10; q[rear++]=top; q[rear++]=top+1; front++; } printf( 阅读全文