Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long long lcmFound(struct Floor floors[], long long count, long long originalJoint, long long maxFloorTileAndJoint) {
- for (long long i = 0; i < count; i++) {
- long long actualJoint = floors[i].joint * 10;
- long long actualTileAndJoint = round((floors[i].tile + floors[i].joint) * 10);
- if (((maxFloorTileAndJoint + originalJoint - actualJoint) % actualTileAndJoint) != 0 ) {
- return 0;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement