Skip to content

Commit 196ca0f

Browse files
committed
sudoku: 2043 A
1 parent 7e2562d commit 196ca0f

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"streambuf": "cpp",
4444
"typeinfo": "cpp",
4545
"variant": "cpp",
46-
"algorithm": "cpp"
46+
"algorithm": "cpp",
47+
"tuple": "cpp"
4748
}
4849
}

projects/sudoku/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def remove_classes_from_div(main_div, classes_to_remove: list[str]):
305305

306306

307307
def requests_get(url: str) -> requests.Response:
308+
if PROXY == "":
309+
return requests.get(url)
308310
return requests.get(url, verify=PROXY)
309311

310312

projects/sudoku/src/2043_A.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
// ----------------- Shortcuts -----------------
5+
#define fastio() \
6+
ios::sync_with_stdio(false); \
7+
cin.tie(nullptr);
8+
using ull = unsigned long long;
9+
10+
// ----------------- Main Solve -----------------
11+
void solve()
12+
{
13+
ull x;
14+
std::cin >> x;
15+
ull res = 1;
16+
while (x > 3) {
17+
x /= 4;
18+
res *= 2;
19+
}
20+
std::cout << res << "\n";
21+
}
22+
23+
int main()
24+
{
25+
fastio();
26+
ull T = 1;
27+
cin >> T;
28+
while (T--) solve();
29+
return 0;
30+
}

projects/sudoku/src/2043_A.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
4
2+
1
3+
5
4+
16
5+
1000000000000000000

projects/sudoku/template/template.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <bits/stdc++.h>
22
using namespace std;
3+
// g++-15 -std=c++17 -O2 -Wall 897_A.cpp -o 897_A
34

45
// ----------------- Shortcuts -----------------
56
#define fastio() \

0 commit comments

Comments
 (0)