Pregunta de entrevista de Soochow University

Prime Factorization and some algorithm question