Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ReRandom
ReRandom / main.cpp
Created December 29, 2016 18:57
last lab
#include <iostream>
#include <map>
#include <list>
#include <algorithm>
#include <cmath>
#include <ctime>
#include <unistd.h>
#include <sys/resource.h>
#include <sys/times.h>
@ReRandom
ReRandom / main.cpp
Last active December 24, 2016 17:31
dick understand how much the dimension of the matrix
//вычисляет длинну числа, при записи в 10й сс
unsigned int numLen10(long a)
{
if(a == 0) return 1;
unsigned int r = 0;
if(a < 0) { ++r;a *= -1; }
while (a) { ++r; a/=10; }
return r;
}