Repository navigation
Expand file tree
/
Copy pathproblem.html
More file actions
237 lines (196 loc) · 8.97 KB
/
Copy pathproblem.html
File metadata and controls
237 lines (196 loc) · 8.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="img/codecell-logo.png">
<link href='https://css.gg/code-slash.css' rel='stylesheet'>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Overpass+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./css/base.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="./css/navbar.css">
<!-- /* MathJax */ -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link rel="shortcut icon" href="./img/codecell_logo.svg" type="image/x-icon" sizes="any">
<script defer src="./js/account_dropdown.js"></script>
<script defer src="./js/burger_menu_dropdown.js"></script>
<title>TSEC CodeCell</title>
</head>
<body>
<nav id="nav" class="desktop navbar navbar-expand-xl navbar-dark .bg-transparent sticky-top">
<a class="navbar-brand mr-auto" href="#">
<img src="img/codecell-logo.png" alt="" width="40">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a href="index.html" class="nav-link">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">About</a>
</li>
<li class="nav-item">
<a href="challenges.html" class="nav-link">Challenges</a>
</li>
<li class="nav-item">
<a href="ranklist.html" class="nav-link">Ranklist</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">TSEC Hacks</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Contact Us</a>
</li>
</ul>
</div>
<!-- If user logged in this div -->
<!-- <div class="right-side">
<div class="account">
<img src="./img/defa.jpg" alt="HK">
<div class="dropdown-caret"></div>
</div>
<div class="dropdown hide">
<div class="user-name">Username</div>
<ul>
<a href="#"><li>Your profile</li></a>
<a href="#"><li>Settings</li></a>
<a href="#"><li>Log Out</li></a>
</ul>
</div>
</div> -->
<!-- Else -->
<a href="#" class="sign-in glow-button mr-auto nav-login">Login</a>
</nav>
<div class="content-container-2">
<div class="container">
<div class="primary-description">
<span>2.2</span> <span>Complicated GCD</span>
</div>
</div>
<div class="problem-info">
<div class="container">
<div class="problem-score">
<span style="color: #fff;">Score: 80</span><span class="pts">pts</span>
</div>
</div>
<div class="container">
<div class="tertiary-description">
<span>Time Limit: 1 sec</span>
<br>
<span>Memory Limit: 1024MB</span>
</div>
</div>
</div>
<div class="problem">
<div class="statment">
Greatest common divisor \(GCD(a, b)\) of two positive integers \(a\) and \(b\) is equal to the biggest integer d such that both integers a and b are divisible by d. There are many efficient algorithms to find greatest common divisor \(GCD(a, b)\), for example, Euclid algorithm.
<br>
Formally, find the biggest integer \(d\), such that all integers \(a, a + 1, a + 2, ..., b\) are divisible by \(d\). To make the problem even more complicated we allow a and b to be up to googol, \(10^{100}\) — such number do not fit even in 64-bit integer type!
</div>
</div>
<br>
<div class="problem-heading">
Constraints
</div>
<div class="problem">
<div class="statment input-format">
\(1 ≤ a ≤ b ≤ 10^{100}\)
</div>
</div>
<br>
<div class="problem-heading">
Input Format
</div>
<div class="problem">
<div class="statment input-format">
\(a\) \(b\)
</div>
</div>
<br>
<div class="problem-heading">
Output Format
</div>
<div class="problem">
<div class="statment">
Output one integer — greatest common divisor of all integers from \(a\) to \(b\) inclusive.
</div>
</div>
<br>
<div class="problem-heading">
Sample Input 1
</div>
<div class="problem">
<div class="statment">
\(3\) \(4\)
</div>
</div>
<br>
<div class="problem-heading">
Sample Output 1
</div>
<div class="problem">
<div class="statment">
\(6\)
</div>
</div>
<br>
<div class="problem-heading">
Explanation
</div>
<div class="problem">
<div class="statment">
For the first case, 60 can be converted to 540 in 2 moves: 60 → 180 → 540. 180 can be converted to 540 in 1 move: 180 → 540. And no need to perform any moves for the third tower. So the height of all the towers is now 540.
<br><br>
For the second case, there is no way to make all heights equal.
</div>
</div>
</div>
<div class="container">
<a href="#" class="button-1 glow-button">Submit</a>
</div>
<div class="content-container-2 problem-verdict">
<span class="verdict">Verdict</span><br>
<span class="ac">Accepted</span><br>
<span class="wa">Wrong Answer</span><br>
<span class="tle">Time Limit Exceeded</span><br>
<span class="mle">Memory Limit Exceeded</span><br>
<span class="re">Runtime Error</span><br>
<span class="ce">Compilation Error</span><br>
</div>
<footer>
<div class="footer">
<div class="footerName">
TSEC CodeCell © 2021 All rights reserved.
</div>
<div class="container mr-auto">
<ion-icon class="social" name="logo-instagram" size="large">
<a href="#"></a>
</ion-icon>
<ion-icon class="social" name="logo-linkedin" size="large">
<a href="#"></a>
</ion-icon>
<ion-icon class="social" name="logo-github" size="large">
<a href="#"></a>
</ion-icon>
<ion-icon class="social" name="logo-facebook" size="large">
<a href="#"></a>
</ion-icon>
<ion-icon class="social" name="logo-youtube" size="large">
<a href="#"></a>
</ion-icon>
</div>
</div>
</footer>
<script src="js/index.js"></script>
<script src="https://unpkg.com/ionicons@5.1.2/dist/ionicons.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>