Running time
MansourQuzmar1 (0)

How can i know running time of my program on replit

You are viewing a single comment. View All
ANDREWVOSS (188)

get the time at the start and end of your program, in python use

import time
start_time = time.time()
#run your program
end_time = time.time()
print(end_time-start_time)

In C/C++ you can use

#include <time.h>

int main() {
  clock_t start_time = clock();
  //run your program
  clock_t end_time = clock();
  printf("%f",((float)t)/CLOCKS_PER_SEC);
}