1
00:00:00,990 --> 00:00:06,810
It's kind of a geeky maths question, but it's actually pretty nice.

2
00:00:07,610 --> 00:00:14,160
No, I think Hilbert's hotel is from something like Hilbert's curve or some function.

3
00:00:14,180 --> 00:00:21,630
And I don't know this guy Hilbert was some math guy who I think had some fury about the infinite numbers

4
00:00:21,630 --> 00:00:22,140
or something.

5
00:00:22,710 --> 00:00:25,140
But anyways, let's read the statement.

6
00:00:26,070 --> 00:00:33,660
So as you probably know, you are given this hotel and basically you have an infinite number of rooms

7
00:00:33,660 --> 00:00:35,820
from minus infinite to plus infinite.

8
00:00:35,850 --> 00:00:43,350
And there is exactly one person staying in each of these rooms called everything and not normal for

9
00:00:43,350 --> 00:00:44,400
a hotel right now.

10
00:00:44,760 --> 00:00:49,870
But the interesting thing is that you are given an array.

11
00:00:50,350 --> 00:00:50,530
Right.

12
00:00:51,550 --> 00:00:53,740
Just called a and has an integers.

13
00:00:54,190 --> 00:00:57,510
And what happens is that for each number key.

14
00:00:57,550 --> 00:01:00,340
So for each room, which has no key.

15
00:01:00,760 --> 00:01:02,770
Of course from minus infinity.

16
00:01:02,800 --> 00:01:03,550
Plus infinite.

17
00:01:04,690 --> 00:01:11,410
The guy who is staying in that room, number K, is now going to be asked to leave that room and go

18
00:01:11,470 --> 00:01:17,120
to room number K plus A. of K modulo N.

19
00:01:17,600 --> 00:01:19,900
And this module is.

20
00:01:20,950 --> 00:01:21,180
Yeah.

21
00:01:21,730 --> 00:01:24,850
They give us some definition for this module, but we are gonna get into it.

22
00:01:25,330 --> 00:01:28,990
So let's see how I thought about this problem.

23
00:01:29,200 --> 00:01:30,940
So let's take some examples first.

24
00:01:30,950 --> 00:01:31,170
Right.

25
00:01:31,450 --> 00:01:33,070
I have basically read this problem.

26
00:01:33,160 --> 00:01:36,970
And of course, first thing I know, it's a math stuff.

27
00:01:38,020 --> 00:01:42,370
And basically, when you're reading on good force is a problem that's about math.

28
00:01:42,940 --> 00:01:46,510
You usually have to get your pen and paper close to you.

29
00:01:47,140 --> 00:01:47,980
I didn't do that.

30
00:01:48,190 --> 00:01:51,640
I took my risk and it turned out I can solve it.

31
00:01:51,640 --> 00:01:54,040
Like only thinking about it, not writing anything.

32
00:01:54,460 --> 00:01:55,470
So let's see.

33
00:01:55,840 --> 00:01:56,770
Let's take some examples.

34
00:01:57,070 --> 00:02:05,590
What I did is I go look at these examples and let's take the first one, which is quite interesting.

35
00:02:05,980 --> 00:02:08,770
So we have four elements, right?

36
00:02:09,520 --> 00:02:11,830
We are given four elements.

37
00:02:12,090 --> 00:02:17,580
Four, they are not the rooms either or for the four elements and equals four.

38
00:02:17,740 --> 00:02:18,070
Whatever.

39
00:02:18,490 --> 00:02:19,430
So any plans for.

40
00:02:19,900 --> 00:02:23,320
And the array A is by.

41
00:02:26,990 --> 00:02:28,990
I've and I think the last element was what?

42
00:02:30,410 --> 00:02:30,740
Sure.

43
00:02:30,950 --> 00:02:31,340
Was it?

44
00:02:31,640 --> 00:02:34,730
Yes, it was one, so that's what happens here.

45
00:02:34,940 --> 00:02:38,020
First of all, let's index these integers, right?

46
00:02:38,270 --> 00:02:41,770
Zero, one, two and three.

47
00:02:42,820 --> 00:02:47,680
And let's try to imagine the rooms of our.

48
00:02:49,400 --> 00:02:55,810
To have here it's I'm going to use my drawing skills, so minus infinity.

49
00:02:59,140 --> 00:03:01,600
Minus infinite, plus one.

50
00:03:02,350 --> 00:03:03,850
And so on and so forth.

51
00:03:07,100 --> 00:03:07,940
Number zero.

52
00:03:11,700 --> 00:03:14,350
Room number one and so on and so forth.

53
00:03:15,330 --> 00:03:17,550
And they'll, of course.

54
00:03:18,740 --> 00:03:19,610
Room number infinite.

55
00:03:20,300 --> 00:03:24,530
And don't ask me how I know this is room number infinite because I don't.

56
00:03:24,800 --> 00:03:30,920
But let's imagine we can get in front of room number infinity or minus infinity, right?

57
00:03:31,130 --> 00:03:32,780
If we had superpowers or something.

58
00:03:33,200 --> 00:03:36,830
So basically, let's imagine all the rooms in our hotel.

59
00:03:36,890 --> 00:03:37,190
Right.

60
00:03:38,080 --> 00:03:39,680
Binding the roll call.

61
00:03:40,260 --> 00:03:41,470
And let's see what happens.

62
00:03:42,070 --> 00:03:51,460
Well, as we said, the guy in rule number case is asked to leave the room and move to Kate plus eight.

63
00:03:52,700 --> 00:03:57,920
Of I think it was the AK modulo and.

64
00:03:59,290 --> 00:03:59,580
Cool.

65
00:04:00,240 --> 00:04:02,610
So let's see what they did here.

66
00:04:04,470 --> 00:04:09,960
I have taken a look at this formula and I see.

67
00:04:11,610 --> 00:04:14,540
Free, let's say, letters.

68
00:04:15,630 --> 00:04:16,290
We just keep.

69
00:04:18,140 --> 00:04:19,740
And and cool.

70
00:04:20,850 --> 00:04:25,710
So they basically see here is some integer key.

71
00:04:27,880 --> 00:04:42,160
Which is between minus infinite and infinite and some integer A of K modulo M, which from, of course,

72
00:04:42,250 --> 00:04:43,260
the input array.

73
00:04:44,290 --> 00:04:45,430
So I'm thinking like this.

74
00:04:45,850 --> 00:04:48,460
All right, man, I have two integers.

75
00:04:49,390 --> 00:04:51,070
One of them is infinite.

76
00:04:51,090 --> 00:04:55,500
Could be anything I can possibly fix the key or something like that.

77
00:04:55,510 --> 00:04:55,780
Right.

78
00:04:56,710 --> 00:05:00,130
So I really have to.

79
00:05:01,700 --> 00:05:02,760
Do something with this.

80
00:05:04,260 --> 00:05:06,690
But what they basically did is that.

81
00:05:08,720 --> 00:05:09,620
Because Kee.

82
00:05:11,020 --> 00:05:12,520
Can take an infinite.

83
00:05:13,490 --> 00:05:14,960
Of possible values.

84
00:05:18,290 --> 00:05:20,030
Eight of Kay modulo and.

85
00:05:21,000 --> 00:05:23,340
Take only impossible values.

86
00:05:23,520 --> 00:05:23,820
Right.

87
00:05:24,000 --> 00:05:25,530
Because there are values in disarray.

88
00:05:26,310 --> 00:05:26,940
So there are.

89
00:05:27,030 --> 00:05:28,610
And possible.

90
00:05:31,310 --> 00:05:36,570
Boy, did I do I didn't fix Kay because no one can do that.

91
00:05:37,140 --> 00:05:40,140
But I have fixed Kay modulo.

92
00:05:42,480 --> 00:05:48,510
I have fixed each and every key module and of course.

93
00:05:49,680 --> 00:05:52,170
This is between zero and minus one.

94
00:05:53,620 --> 00:05:55,410
That's the first thing I know I have to do.

95
00:05:57,300 --> 00:05:59,460
And let's start from the beginning.

96
00:06:01,400 --> 00:06:06,500
Let's take the case in which key module N is equal to zero.

97
00:06:08,390 --> 00:06:11,840
Let me erase this down here and see what happens.

98
00:06:13,710 --> 00:06:17,620
What's going to happen on Teneriffe?

99
00:06:17,720 --> 00:06:18,330
Number one.

100
00:06:19,500 --> 00:06:21,420
Kay Modula.

101
00:06:26,200 --> 00:06:32,320
Well, first of all, let's take a look at a zero, which is five.

102
00:06:36,020 --> 00:06:37,460
What does the problem tell us?

103
00:06:39,290 --> 00:06:43,670
That the guy in each and every no key.

104
00:06:45,870 --> 00:06:48,370
Which is now a multiple of em.

105
00:06:49,230 --> 00:06:49,590
Right.

106
00:06:49,950 --> 00:06:52,890
Because we have set this reminder, we know it right now.

107
00:06:53,880 --> 00:06:55,890
So what are the possible values?

108
00:07:01,200 --> 00:07:03,780
Which is this room then?

109
00:07:06,350 --> 00:07:07,100
Could be an.

110
00:07:10,700 --> 00:07:11,390
Let's say here.

111
00:07:12,650 --> 00:07:13,310
We have room.

112
00:07:14,590 --> 00:07:15,280
No n.

113
00:07:16,460 --> 00:07:18,380
Could be cross then.

114
00:07:21,520 --> 00:07:22,240
We have room.

115
00:07:23,700 --> 00:07:24,630
Number two, cross that.

116
00:07:25,670 --> 00:07:28,310
So on and so forth, of course, infinite Vellis here.

117
00:07:29,520 --> 00:07:32,790
And also, there are negative versions.

118
00:07:32,970 --> 00:07:33,270
Right.

119
00:07:33,870 --> 00:07:35,650
Which is minus two crossed.

120
00:07:37,160 --> 00:07:38,540
Minus four crust and.

121
00:07:42,100 --> 00:07:43,750
So here I have.

122
00:07:44,690 --> 00:07:45,590
Some doors.

123
00:07:45,620 --> 00:07:46,370
Some rooms.

124
00:07:49,230 --> 00:07:51,900
Minus two, cross that and so on and so forth.

125
00:07:54,140 --> 00:08:04,430
What happens is that I can imagine that all these guys are taken out of these rooms and they are shifted

126
00:08:04,730 --> 00:08:05,330
by five.

127
00:08:07,410 --> 00:08:11,220
That's all they are, just shifted by five.

128
00:08:16,470 --> 00:08:18,540
Bus five and so on and so forth.

129
00:08:21,460 --> 00:08:23,170
This hotel is infinite.

130
00:08:27,740 --> 00:08:32,960
There is actually one thing which we can mathematically notice about these numbers.

131
00:08:34,940 --> 00:08:43,760
What happens is that we kind of rebind these numbers what used to be zero.

132
00:08:45,540 --> 00:08:45,880
Is No.

133
00:08:45,880 --> 00:08:51,600
Five, what used to be N is now and plus five and so on and so forth.

134
00:08:53,260 --> 00:09:05,290
So what I did is the following thing, if I can imagine an array of infinite numbers from minus infinite

135
00:09:05,560 --> 00:09:14,020
to infinite and every value in disarray is one, because there is one guy there on that position.

136
00:09:17,840 --> 00:09:20,600
Which we will call Geary of rooms.

137
00:09:20,900 --> 00:09:21,200
All right.

138
00:09:21,930 --> 00:09:23,410
Well, the array of rooms.

139
00:09:30,700 --> 00:09:36,210
Plus Symphonie, plus one dot, dot, dot zero, one dot, dot, dot.

140
00:09:36,950 --> 00:09:37,080
If.

141
00:09:41,420 --> 00:09:52,520
On this or in disarray is one when Kay modulo n e0, I literally take all these positions.

142
00:09:53,950 --> 00:09:54,670
Position zero.

143
00:09:56,980 --> 00:09:59,570
Xitian minus N position to cross N.

144
00:09:59,910 --> 00:10:02,150
Position minus two crossed in somewhere here.

145
00:10:02,610 --> 00:10:04,750
And all I do is take.

146
00:10:05,880 --> 00:10:07,280
That one here.

147
00:10:08,490 --> 00:10:09,560
And the movie it.

148
00:10:11,930 --> 00:10:14,920
But that position plus five for this example.

149
00:10:17,110 --> 00:10:19,530
So I basically asked myself the following thing.

150
00:10:21,570 --> 00:10:28,280
How can I make sure or how can I check if after performing all these moves basically.

151
00:10:28,760 --> 00:10:29,090
Right.

152
00:10:29,460 --> 00:10:33,180
Subtracting one from here and increasing one here?

153
00:10:33,360 --> 00:10:33,720
Yes.

154
00:10:34,410 --> 00:10:36,660
How can I make sure that the new array.

155
00:10:38,500 --> 00:10:39,130
Let's call it.

156
00:10:39,880 --> 00:10:41,750
Those are free of those, actually.

157
00:10:42,180 --> 00:10:42,810
Let's call it a.

158
00:10:45,830 --> 00:10:50,540
The new array room's prime also has only values of one.

159
00:10:53,160 --> 00:10:55,130
They have to make sure, oh, this.

160
00:10:56,310 --> 00:11:03,030
So basically, I have to make sure that there isn't any position he.

161
00:11:06,300 --> 00:11:08,070
Where there are two.

162
00:11:13,120 --> 00:11:14,740
Positions X and Y.

163
00:11:16,020 --> 00:11:17,670
That are going to be.

164
00:11:20,800 --> 00:11:22,020
Basically to get here.

165
00:11:24,460 --> 00:11:34,900
So I have to make sure that there are in two different rooms, X and Y, that are going to be binded

166
00:11:34,930 --> 00:11:35,950
to the same number.

167
00:11:36,910 --> 00:11:42,050
Basically, I have to make sure that this function, which takes my people from their rooms and move

168
00:11:42,050 --> 00:11:44,770
it to other rooms, is how do you call it?

169
00:11:48,010 --> 00:11:50,950
I can think about the term by objective or something.

170
00:11:51,010 --> 00:11:52,290
I think that's the term for it.

171
00:11:52,290 --> 00:11:52,400
Yes.

172
00:11:53,260 --> 00:11:58,050
So there are not any two different values which are going to be equal.

173
00:12:00,700 --> 00:12:01,690
Having thought about all this.

174
00:12:02,560 --> 00:12:03,850
Get back to this K module.

175
00:12:04,020 --> 00:12:06,740
And now everything is gonna be clear.

176
00:12:09,890 --> 00:12:14,630
This example on this case, on this scenario when Kay modulo any zero.

177
00:12:17,330 --> 00:12:21,320
What happens is that each number.

178
00:12:22,270 --> 00:12:26,290
Each position from this array, which is a multiple of an.

179
00:12:29,300 --> 00:12:32,690
Now is not going to be any more a multiple of an.

180
00:12:33,990 --> 00:12:36,930
But it's a reminder modulo and is going to be five.

181
00:12:40,400 --> 00:12:41,640
Port, this scene aerial.

182
00:12:44,010 --> 00:12:45,800
Where let's say here.

183
00:12:47,500 --> 00:12:47,800
Right.

184
00:12:48,190 --> 00:12:49,650
Kay modulo n zero.

185
00:12:51,870 --> 00:12:52,470
Basically.

186
00:12:53,950 --> 00:12:59,350
Each and every number, which modulo N was zero.

187
00:12:59,950 --> 00:13:00,280
Right.

188
00:13:00,340 --> 00:13:03,700
So it was a multiple of N No.

189
00:13:05,000 --> 00:13:10,610
From multiple of end, let's say something like, I know D crust n.

190
00:13:11,570 --> 00:13:13,540
Is now the crust.

191
00:13:13,840 --> 00:13:18,070
And plus a of zero, which is this value.

192
00:13:19,790 --> 00:13:22,670
So if that number.

193
00:13:25,540 --> 00:13:26,630
Modulo an.

194
00:13:28,880 --> 00:13:30,110
Was zero.

195
00:13:31,900 --> 00:13:33,610
After performing this.

196
00:13:35,880 --> 00:13:38,100
The new number modulo an.

197
00:13:41,520 --> 00:13:42,480
To be a zero.

198
00:13:43,670 --> 00:13:46,800
Well, a zero, of course, modulo an.

199
00:13:48,840 --> 00:13:51,210
So the whole thing that happens here.

200
00:13:54,970 --> 00:13:57,070
One reminder becomes another.

201
00:13:58,620 --> 00:14:02,660
Why do we have to imagine instead of that infinite array of rooms?

202
00:14:03,630 --> 00:14:11,850
Is that these rooms are grouped by the reminder of their index, their number modulo N.

203
00:14:12,660 --> 00:14:12,960
Right.

204
00:14:13,920 --> 00:14:19,800
So on that infinity of numbers, I'm going to have the numbers which modulo N.

205
00:14:20,840 --> 00:14:26,190
Reminder zero, the ones which give reminder, one reminder, too.

206
00:14:26,990 --> 00:14:28,310
And so on and so forth.

207
00:14:29,280 --> 00:14:37,480
Lastly, all the numbers from minus infinity infinite, which modulo n give reminder and minus one.

208
00:14:38,800 --> 00:14:43,060
Of course, there are an infinity of numbers in each of these and groups.

209
00:14:43,480 --> 00:14:44,560
But that doesn't matter.

210
00:14:47,780 --> 00:14:50,000
When I took a of zero.

211
00:14:52,330 --> 00:15:00,300
Each and every number of reminder zero became now a number of reminder, a zero modulo an.

212
00:15:01,320 --> 00:15:07,740
This zero becomes a zero modulo and.

213
00:15:11,190 --> 00:15:13,110
Then what about reminder one?

214
00:15:13,860 --> 00:15:15,690
Well, each number.

215
00:15:17,570 --> 00:15:19,310
Which was.

216
00:15:23,880 --> 00:15:26,100
Something like this right here one.

217
00:15:27,600 --> 00:15:29,640
Each number, which was something like decreased.

218
00:15:29,710 --> 00:15:37,260
And plus what gave reminder one now is going to be increased by a one.

219
00:15:37,950 --> 00:15:43,680
So is D crust and plus a of one plus one.

220
00:15:45,400 --> 00:15:47,980
This reminder was.

221
00:15:51,550 --> 00:15:52,490
A new reminder.

222
00:15:55,450 --> 00:15:59,140
A one, us one and everything.

223
00:16:00,220 --> 00:16:01,380
Module at.

224
00:16:07,190 --> 00:16:08,960
But to what happened?

225
00:16:09,710 --> 00:16:10,520
Exactly the same thing.

226
00:16:13,030 --> 00:16:14,380
So reminder to.

227
00:16:17,720 --> 00:16:19,990
A of two plus two modularly.

228
00:16:21,380 --> 00:16:22,180
And you've got a whole idea.

229
00:16:25,510 --> 00:16:28,390
So what happens is that.

230
00:16:30,190 --> 00:16:32,590
For each and every reminder.

231
00:16:35,370 --> 00:16:37,320
Between zero.

232
00:16:43,130 --> 00:16:49,310
This is going to be transformed, as you've seen, into air plus eight of our.

233
00:16:50,240 --> 00:16:51,470
Everything Modula And.

234
00:16:58,280 --> 00:17:00,710
Did we know this or what?

235
00:17:04,620 --> 00:17:08,100
What did we agree that we will have to check?

236
00:17:09,210 --> 00:17:10,440
Remember we said.

237
00:17:14,980 --> 00:17:22,180
There shouldn't be two rooms X different than Y such that after the transformation.

238
00:17:27,950 --> 00:17:34,760
And as we've seen, because we transform the numbers grouped by reminders.

239
00:17:36,050 --> 00:17:37,200
This can happen.

240
00:17:39,710 --> 00:17:41,060
If and only if.

241
00:17:42,280 --> 00:17:44,450
The reminder of X modulo eight.

242
00:17:46,930 --> 00:17:48,940
A reminder of why modulo.

243
00:17:50,620 --> 00:17:51,800
If these two are different.

244
00:17:51,820 --> 00:17:57,160
Of course, they're reminders are going to be different if this two reminders.

245
00:17:58,340 --> 00:17:59,630
After applying.

246
00:18:00,570 --> 00:18:03,480
The transformation for all the reminders.

247
00:18:04,320 --> 00:18:05,520
Become now.

248
00:18:07,050 --> 00:18:07,800
Same reminder.

249
00:18:08,280 --> 00:18:10,490
Which is Ze modulo n.

250
00:18:11,590 --> 00:18:12,780
So all we have to do.

251
00:18:15,800 --> 00:18:23,150
Each of these numbers are plus eight of our modulo n are also going to be.

252
00:18:24,080 --> 00:18:24,740
Different.

253
00:18:25,700 --> 00:18:28,040
All the values from zero to N minus one.

254
00:18:28,460 --> 00:18:28,760
Right.

255
00:18:29,150 --> 00:18:33,560
So we have basically started from the.

256
00:18:35,790 --> 00:18:41,010
Permutation of all the numbers from zero to minus one in this order.

257
00:18:41,940 --> 00:18:43,470
And we will update.

258
00:18:44,530 --> 00:18:45,580
Another permutation.

259
00:18:47,780 --> 00:18:52,000
Based on the Formula R plus eight of our Modulo n.

260
00:18:56,990 --> 00:19:03,030
Typically, we will obtain an array, and if this array is a permutation that everything is fine because

261
00:19:03,060 --> 00:19:05,880
as I've told you, if this is a permutation.

262
00:19:06,990 --> 00:19:10,410
This means that each two different reminders.

263
00:19:11,280 --> 00:19:14,430
After the transformation are still different.

264
00:19:16,320 --> 00:19:16,650
Right.

265
00:19:17,070 --> 00:19:18,690
So if our one.

266
00:19:19,610 --> 00:19:20,630
And ah, to.

267
00:19:21,530 --> 00:19:27,180
Or different from this permutation and after the transformation, they are still different.

268
00:19:30,060 --> 00:19:31,920
This means that those numbers.

269
00:19:33,450 --> 00:19:34,380
X and Y.

270
00:19:36,230 --> 00:19:41,540
Which were X in group air one and Y in group F two.

271
00:19:44,130 --> 00:19:46,800
What happens after they are transformed?

272
00:19:47,790 --> 00:19:50,280
They're reminders modulo and are different.

273
00:19:50,310 --> 00:19:53,440
Of course, the numbers are going to be all.

274
00:19:53,850 --> 00:19:54,250
Also the.

275
00:19:55,700 --> 00:19:56,210
And that's it.

276
00:19:56,990 --> 00:19:59,090
This is how you solve this problem.

277
00:20:01,400 --> 00:20:11,420
You don't think about the infinite possible values of the room numbers, but you think about their fine,

278
00:20:11,430 --> 00:20:14,910
neat posable reminders modulo and.

279
00:20:15,260 --> 00:20:17,540
And in this way, you have something.

280
00:20:17,820 --> 00:20:18,590
Find it right.

281
00:20:18,980 --> 00:20:21,680
So you can iterate for those elements.

282
00:20:22,880 --> 00:20:24,320
So what they basically did here.

283
00:20:25,370 --> 00:20:26,750
The same thing is the following.

284
00:20:28,230 --> 00:20:31,250
We've basically have iterated through the whole array A.

285
00:20:33,100 --> 00:20:35,770
And I had something like a hash table.

286
00:20:37,540 --> 00:20:37,890
Stable.

287
00:20:38,710 --> 00:20:44,050
Unordered map, an order set frequency array vector from Estill.

288
00:20:44,230 --> 00:20:45,220
It's really your choice.

289
00:20:46,720 --> 00:20:49,630
Let's say it's a harsh day just for the sake of it.

290
00:20:50,200 --> 00:20:51,280
I've got the hash table.

291
00:20:52,750 --> 00:21:00,470
And for each and every element from disarray, I simply checked if that element A of all.

292
00:21:05,430 --> 00:21:06,150
Module An.

293
00:21:12,450 --> 00:21:13,620
Hasn't been encountered.

294
00:21:17,090 --> 00:21:25,580
If this value is not part of my hashtag, if it's not, that's cool, inserted into the hash table and

295
00:21:25,580 --> 00:21:27,680
continue if it is part.

296
00:21:29,880 --> 00:21:30,860
Timperley, return minus.

297
00:21:32,040 --> 00:21:32,580
And that was it.

298
00:21:34,350 --> 00:21:35,190
Just one thing.

299
00:21:35,490 --> 00:21:38,760
The problem was when these numbers.

300
00:21:42,250 --> 00:21:49,480
Because if these numbers are negative, the value AA plus I everything modulo N is not going to be correctly

301
00:21:49,510 --> 00:21:50,080
computed.

302
00:21:51,340 --> 00:22:00,070
What I did, basically, is that if this number is negative, I have increased it by a value like 10

303
00:22:00,100 --> 00:22:02,020
at power line, crossed an.

304
00:22:02,990 --> 00:22:08,570
So I make sure that this final value is positive and also.

305
00:22:09,890 --> 00:22:15,320
The reminder of this value is equal to the reminder of this value modulo.

306
00:22:16,280 --> 00:22:16,580
Right.

307
00:22:16,940 --> 00:22:20,810
Be very careful here because if you take something like minus two.

308
00:22:23,080 --> 00:22:23,860
Modulo 10.

309
00:22:25,640 --> 00:22:31,700
You should get eight for this problem, but you will get minus two, which is a problem.

310
00:22:32,390 --> 00:22:38,630
But if you take this minus two and increase it by something big enough, this becomes eight, which

311
00:22:38,630 --> 00:22:39,800
is greater than zero.

312
00:22:40,490 --> 00:22:44,720
And the reminder modulo 10 is eight, which is indeed the great.

313
00:22:45,880 --> 00:22:51,010
So the problem that I had and I sold it quickly, is to increase this number by something big enough

314
00:22:51,010 --> 00:22:52,010
so it becomes post.

315
00:22:53,070 --> 00:22:55,020
That's it all about the reminders.
