From 1464165a9151fe506b2d305494b72fd3db4db0f2 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 10 Jul 2023 20:20:03 +0200 Subject: [PATCH] chore: format using google style Signed-off-by: Matej Focko --- 266/a.cpp | 1 - 546/a.cpp | 7 ++----- 791/a.cpp | 9 +++------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/266/a.cpp b/266/a.cpp index a61876a..f08f3ad 100644 --- a/266/a.cpp +++ b/266/a.cpp @@ -35,7 +35,6 @@ void solve() { #ifndef TEST int main(void) { - #ifdef SINGLE solve(); diff --git a/546/a.cpp b/546/a.cpp index 59530f2..d684a03 100644 --- a/546/a.cpp +++ b/546/a.cpp @@ -5,11 +5,9 @@ namespace { using namespace std; long pow(long base, long exp) { - if (exp == 0) - return 1; + if (exp == 0) return 1; long half = pow(base, exp / 2); - if (exp % 2 == 0) - return half * half; + if (exp % 2 == 0) return half * half; return half * half * base; } @@ -34,7 +32,6 @@ void solve() { #ifndef TEST int main(void) { - #ifdef SINGLE solve(); diff --git a/791/a.cpp b/791/a.cpp index a5e3cda..a98ac9d 100644 --- a/791/a.cpp +++ b/791/a.cpp @@ -5,11 +5,9 @@ namespace { using namespace std; long pow(long base, long exp) { - if (exp == 0) - return 1; + if (exp == 0) return 1; long half = pow(base, exp / 2); - if (exp % 2 == 0) - return half * half; + if (exp % 2 == 0) return half * half; return half * half * base; } @@ -40,7 +38,7 @@ void solve() { cout << find_k(a, b) << "\n"; } -} // namespace +} // namespace // for single test case, comment out for ‹N› test cases #define SINGLE @@ -48,7 +46,6 @@ void solve() { #ifndef TEST int main(void) { - #ifdef SINGLE solve();