Cody

Problem 45394. Count the number of folds needed to pack a large sheet

Solution 3114931

Submitted on 8 Oct 2020 by Gergely Patay
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(number_of_folds(3247,2132),24))

ans = 24

2   Pass
assert(isequal(number_of_folds(1403,3757),23))

ans = 23

3   Pass
assert(isequal(number_of_folds(3504,2201),24))

ans = 24

4   Pass
assert(isequal(number_of_folds(2490,2349),24))

ans = 24

5   Pass
assert(isequal(number_of_folds(831,1205),21))

ans = 21

6   Pass
assert(isequal(number_of_folds(1884,922),21))

ans = 21

7   Pass
assert(isequal(number_of_folds(2,4),5))

ans = 5

8   Pass
assert(isequal(number_of_folds(3378,780),22))

ans = 22

9   Pass
assert(isequal(number_of_folds(904,683),20))

ans = 20

10   Pass
assert(isequal(number_of_folds(911,1743),21))

ans = 21

11   Pass
assert(isequal(number_of_folds(1245,3694),23))

ans = 23

12   Pass
assert(isequal(number_of_folds(1721,740),21))

ans = 21

13   Pass
assert(isequal(number_of_folds(3620,3919),24))

ans = 24

14   Pass
assert(isequal(number_of_folds(1756,445),20))

ans = 20

15   Pass
assert(isequal(number_of_folds(1033,1635),22))

ans = 22

16   Pass
assert(isequal(number_of_folds(2380,1049),23))

ans = 23

17   Pass
assert(isequal(number_of_folds(2412,2845),24))

ans = 24

18   Pass
assert(isequal(number_of_folds(887,470),19))

ans = 19

19   Pass
assert(isequal(number_of_folds(1187,1276),22))

ans = 22

20   Pass
assert(isequal(number_of_folds(1697,2032),22))

ans = 22

21   Pass
assert(isequal(number_of_folds(343,1050),20))

ans = 20

22   Pass
assert(isequal(number_of_folds(3205,117),19))

ans = 19

23   Pass
assert(isequal(number_of_folds(3716,2922),24))

ans = 24

24   Pass
assert(isequal(number_of_folds(1955,2315),23))

ans = 23

25   Pass
assert(isequal(number_of_folds(950,1836),21))

ans = 21

26   Pass
assert(isequal(number_of_folds(3853,2188),24))

ans = 24

27   Pass
assert(isequal(number_of_folds(2085,927),22))

ans = 22

28   Pass
assert(isequal(number_of_folds(1956,2497),23))

ans = 23

29   Pass
assert(isequal(number_of_folds(2717,1583),23))

ans = 23

30   Pass
assert(isequal(number_of_folds(1470,3952),23))

ans = 23

31   Pass
assert(isequal(number_of_folds(151,3541),20))

ans = 20

32   Pass
assert(isequal(number_of_folds(3654,3185),24))

ans = 24

33   Pass
assert(isequal(number_of_folds(395,1048),20))

ans = 20

34   Pass
assert(isequal(number_of_folds(1342,2719),23))

ans = 23

35   Pass
assert(isequal(number_of_folds(547,2885),22))

ans = 22

36   Pass
assert(isequal(number_of_folds(428,2616),21))

ans = 21

37   Pass
assert(isequal(number_of_folds(1977,3117),23))

ans = 23

38   Pass
assert(isequal(number_of_folds(2861,3615),24))

ans = 24

39   Pass
assert(isequal(number_of_folds(3564,1337),23))

ans = 23

40   Pass
assert(isequal(number_of_folds(1,4000),13))

ans = 13

41   Pass
assert(isequal(number_of_folds(2795,792),22))

ans = 22

42   Pass
assert(isequal(number_of_folds(123,2977),19))

ans = 19

43   Pass
assert(isequal(number_of_folds(2001,1920),22))

ans = 22

44   Pass
assert(isequal(number_of_folds(3619,2440),24))

ans = 24

45   Pass
assert(isequal(number_of_folds(2471,3438),24))

ans = 24

46   Pass
assert(isequal(number_of_folds(3222,2307),24))

ans = 24

47   Pass
assert(isequal(number_of_folds(732,960),20))

ans = 20

48   Pass
assert(isequal(number_of_folds(3547,115),19))

ans = 19

49   Pass
assert(isequal(number_of_folds(1960,672),21))

ans = 21

50   Pass
assert(isequal(number_of_folds(3915,2851),24))

ans = 24

51   Pass
assert(isequal(number_of_folds(2002,1885),22))

ans = 22

52   Pass
assert(isequal(number_of_folds(239,2728),20))

ans = 20

53   Pass
assert(isequal(number_of_folds(170,286),17))

ans = 17

54   Pass
assert(isequal(number_of_folds(2087,387),21))

ans = 21

55   Pass
assert(isequal(number_of_folds(3273,3271),24))

ans = 24

56   Pass
assert(isequal(number_of_folds(2890,600),22))

ans = 22

57   Pass
assert(isequal(number_of_folds(2639,2075),24))

ans = 24

58   Pass
assert(isequal(number_of_folds(3892,2596),24))

ans = 24

59   Pass
assert(isequal(number_of_folds(3202,1816),23))

ans = 23

60   Pass
assert(isequal(number_of_folds(1730,3302),23))

ans = 23

61   Pass
assert(isequal(number_of_folds(334,533),19))

ans = 19

62   Pass
assert(isequal(number_of_folds(694,1564),21))

ans = 21

63   Pass
assert(isequal(number_of_folds(3326,3214),24))

ans = 24

64   Pass
assert(isequal(number_of_folds(242,1598),19))

ans = 19

65   Pass
assert(isequal(number_of_folds(2108,1668),23))

ans = 23

66   Pass
assert(isequal(number_of_folds(2628,2512),24))

ans = 24

67   Pass
assert(isequal(number_of_folds(1168,1727),22))

ans = 22

68   Pass
assert(isequal(number_of_folds(62,3937),18))

ans = 18

69   Pass
assert(isequal(number_of_folds(669,425),19))

ans = 19

70   Pass
assert(isequal(number_of_folds(1490,793),21))

ans = 21

71   Pass
assert(isequal(number_of_folds(1959,1358),22))

ans = 22

72   Pass
assert(isequal(number_of_folds(3807,3682),24))

ans = 24

73   Pass
assert(isequal(number_of_folds(211,2952),20))

ans = 20

74   Pass
assert(isequal(number_of_folds(1077,1692),22))

ans = 22

75   Pass
assert(isequal(number_of_folds(2192,3771),24))

ans = 24

76   Pass
assert(isequal(number_of_folds(1,1),2))

ans = 2

77   Pass
assert(isequal(number_of_folds(1671,3933),23))

ans = 23

78   Pass
assert(isequal(number_of_folds(1206,2805),23))

ans = 23

79   Pass
assert(isequal(number_of_folds(2666,2157),24))

ans = 24

80   Pass
assert(isequal(number_of_folds(2793,2667),24))

ans = 24

81   Pass
assert(isequal(number_of_folds(713,513),20))

ans = 20

82   Pass
assert(isequal(number_of_folds(3997,685),22))

ans = 22

83   Pass
assert(isequal(number_of_folds(131,2245),20))

ans = 20

84   Pass
assert(isequal(number_of_folds(3528,2677),24))

ans = 24

85   Pass
assert(isequal(number_of_folds(762,1476),21))

ans = 21

86   Pass
assert(isequal(number_of_folds(1843,3927),23))

ans = 23

87   Pass
assert(isequal(number_of_folds(626,3423),22))

ans = 22

88   Pass
assert(isequal(number_of_folds(2580,1506),23))

ans = 23

89   Pass
assert(isequal(number_of_folds(764,1714),21))

ans = 21

90   Pass
assert(isequal(number_of_folds(1929,483),20))

ans = 20

91   Pass
assert(isequal(number_of_folds(2359,905),22))

ans = 22

92   Pass
assert(isequal(number_of_folds(1539,2332),23))

ans = 23

93   Pass
assert(isequal(number_of_folds(1008,1162),21))

ans = 21

94   Pass
assert(isequal(number_of_folds(2469,1062),23))

ans = 23

95   Pass
assert(isequal(number_of_folds(15,15),8))

ans = 8

96   Pass
assert(isequal(number_of_folds(3298,3931),24))

ans = 24

97   Pass
assert(isequal(number_of_folds(2921,1376),23))

ans = 23

98   Pass
assert(isequal(number_of_folds(2337,432),21))

ans = 21

99   Pass
assert(isequal(number_of_folds(3626,3519),24))

ans = 24

100   Pass
assert(isequal(number_of_folds(3272,1043),23))

ans = 23

101   Pass
assert(isequal(number_of_folds(3,2),4))

ans = 4

102   Pass
assert(isequal(number_of_folds(2378,91),19))

ans = 19

103   Pass
assert(isequal(number_of_folds(1702,1251),22))

ans = 22

104   Pass
assert(isequal(number_of_folds(646,716),20))

ans = 20

105   Pass
assert(isequal(number_of_folds(1692,377),20))

ans = 20

106   Pass
assert(isequal(number_of_folds(16,15),9))

ans = 9

Suggested Problems

More from this Author19

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!