Avatar ·

What is the difference between venv and virtualenv?

📁 question, venv

  1. venv is a built-in tool, virtualenv needs to be installed separately
  2. venv creates an environment slower than virtualenv

Are there any other differences? (I couldn't find Russian-language topics on this question)

Avatar ·

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