This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include "globals.mzn"; | |
% The square of the size of the board (3 in a "regular" Sudoku) | |
int: S; | |
int: N = S*S; | |
% An array of hints, using 0 for cells for which we don't have any hints. | |
array[int,int] of int: start; | |
% Variables (one variable per cell representing the number to be put in the cell) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
int power = 8; | |
double val = log(power) / log(2); // = 3 | |
int a = val; | |
int b = floor(val); | |
int c = log(8) / log(2); | |
int d = log(power) / log(2); | |
int e = floor(log(power) / log(2)); | |