Add .clang-format and apply it
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::vector<int> vals;
|
||||
for (std::string line; std::getline(std::cin, line);) {
|
||||
int val = std::stoi(line, nullptr, 10);
|
||||
@@ -12,8 +13,8 @@ int main(int argc, char **argv) {
|
||||
for (std::size_t j = 0; j < i; ++j) {
|
||||
int64_t v2 = vals[j];
|
||||
if (v1 + v2 + val == 2020) {
|
||||
std::cout << v1 << " * " << v2 << " * " << val << " = "
|
||||
<< v1 * v2 * std::int64_t(val) << "\n";
|
||||
std::cout << v1 << " * " << v2 << " * " << val << " = " << v1 * v2 * std::int64_t(val)
|
||||
<< "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user