about | help | code help+videos | done | prefs |
Two integers are relatively prime (or coprime) if there is no integer greater than one that divides them both (that is, their greatest common divisor is one). For example, 12 and 13 are relatively prime, but 12 and 14 are not, because they are both divisible by 2. As preconditions, you may assume that 'a' and 'b' are both positive integers greater than 1. You may NOT assume that a<b or that b<a. test2022_05_16_APSL_relativelyPrime(2000, 1707) → true test2022_05_16_APSL_relativelyPrime(51, 51) → false test2022_05_16_APSL_relativelyPrime(9, 15) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy