Submission #1693226
Source Code Expand
#include <bits/stdc++.h> long long n, x; int main() { scanf("%lld%lld", &n, &x); printf("%lld\n", 3 * (n - __gcd(n, x))); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Mysterious Light |
User | OMTWOCZWEIXVI |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 149 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:39: error: ‘__gcd’ was not declared in this scope printf("%lld\n", 3 * (n - __gcd(n, x))); ^ ./Main.cpp:7:39: note: suggested alternative: In file included from /usr/include/c++/5/algorithm:62:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64, from ./Main.cpp:1: /usr/include/c++/5/bits/stl_algo.h:1229:5: note: ‘std::__gcd’ __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) ^ ./Main.cpp:6:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld", &n, &x); ^