How to translate this c++ code in python?

How to translate this c++ code in python?
#include <iostream>

using namespace std;

int main(void)
{
long k, m, n, res; // cosmetologists, hours every, girls
cin>>k>>m>>n;
res=n/k*2*m;
if(n%k) res+=2*m;
cout<<res; return 0; }< code></res></iostream>
June 8th 19 at 17:11
1 answer
June 8th 19 at 17:13
import sys
if __name__ == "__main__":
 k, m, n = map(int, input().split())
 res = n / k * 2 * m
 if n % k: res += 2 * m
print(res)
 sys.exit(0)

Python 3.6
And why 1, 2 and 7 lines? - Marty_Leffl commented on June 8th 19 at 17:16
in the job was to translate, I translated line by line - Sonny.Powlowski commented on June 8th 19 at 17:19

Find more questions by tags PythonC++