Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ randint
Function
randint
code/mathematics/fastmul.test.cpp:2–9 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
2
intx randint(int len) {
3
stringstream ss;
4
ss << rng() % 9 + 1;
5
for (int i = 0; i < len-1; i++)
6
ss << rng() % 10;
7
8
return intx(ss.str());
9
}
10
11
void test() {
12
/* Field testing: SPOJ {MUL,TMUL,VFMUL} */
Callers
1
test
Function · 0.70
Calls
1
intx
Class · 0.85
Tested by
no test coverage detected