What is the difference between venv and virtualenv?
📁 question, venv
venvis a built-in tool,virtualenvneeds to be installed separatelyvenvcreates an environment slower thanvirtualenv
Are there any other differences? (I couldn't find Russian-language topics on this question)
Actually, you just need to find the least common multiple for all numbers from 1 to 20 :) Elementary, no brute force, instantly.
I can sketch code in C or C++, I don't know Python.
Here's the code - Euclidean algorithm for GCD, then LCM...
long gcd(long m, long n){ while(m && n) if (m < n) n %= m; else m %= n; retu (m == 0L) ? n : m;}long lcm(long m, long n){ retu (m/gcd(m,n))*n;}int main(int argc, const char * argv[]){ long Res = 1; for(int i = 2 Log in to leave an answer
Blogs