#include<iostream>#include<vector>#include<unordered_map>using namespace std;bool solution(int A,int B,int C){ int t=A%B,res=t; int n=1; unordered_map<int,int> M; while(!M[res]) { if(res==C) return true; M[res]=1; n; res...