https://www.acmicpc.net/problem/1963 코드#include #include #include using namespace std;#define MAX 10001#define FASTIO ios::sync_with_stdio(false); cin.tie(NULL);typedef pair pi;bool isPrime[MAX], visit[MAX];int change[4] = { 1000, 100, 10, 1 };void checkPrime() { memset(isPrime, true, sizeof(isPrime)); for (int i = 2; i*i q; q.push({ now, 0 }); visit[now] = true; while (!q.empty()) { int value ..