numbers.cpp: In function 'bool ok(std::string)':
numbers.cpp:7:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
7 | for(int i = 0; i < s.size() - 1; i++)
| ~~^~~~~~~~~~~~~~
numbers.cpp:9:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for(int j = i + 1; j < s.size(); j++)
| ~~^~~~~~~~~~
numbers.cpp: In function 'void solve()':
numbers.cpp:31:13: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
31 | scanf("%lld%lld", &a, &b);
| ~~~^ ~~
| | |
| | int*
| long long int*
| %d
numbers.cpp:31:17: warning: format '%lld' expects argument of type 'long long int*', but argument 3 has type 'int*' [-Wformat=]
31 | scanf("%lld%lld", &a, &b);
| ~~~^ ~~
| | |
| | int*
| long long int*
| %d
numbers.cpp:40:14: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
40 | printf("%lld", (b - a + 1) - cnt);
| ~~~^ ~~~~~~~~~~~~~~~~~
| | |
| long long int int
| %d
numbers.cpp:30:22: warning: unused variable 'k' [-Wunused-variable]
30 | int a, b, cnt = 0, k;
| ^
numbers.cpp:31:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | scanf("%lld%lld", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~~~