제출 #1121031

#제출 시각아이디문제언어결과실행 시간메모리
1121031vjudge1Palindrome-Free Numbers (BOI13_numbers)C++17
1.25 / 100
1081 ms504 KiB
#include<bits/stdc++.h> #define ll long long #define pb push_back #define in insert #define fi first #define se second #define vl vector<ll> #define all(v) v.begin(), v.end() #define endl "\n" using namespace std; const int sz = 1e6 + 5; /// mind this const int MAX = 2e6 + 123; const int BS = 61; const int mod = 998244353; void solve(){ ll a, b, i, j, ans = 0; cin >> a >> b; for(i = a; i <= b; i++){ ll x = i; bool ok = 1; while(x >= 10){ if (x >= 100) ok &= (x / 100) % 10 != x % 10; if (x >= 10) ok &= (x / 10) % 10 != x % 10; } ans += ok; } cout << ans << endl; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll t = 1; // cin >> t; while(t--){ solve(); } } /* 123 321 */

컴파일 시 표준 에러 (stderr) 메시지

numbers.cpp: In function 'void solve()':
numbers.cpp:19:17: warning: unused variable 'j' [-Wunused-variable]
   19 |     ll a, b, i, j, ans = 0;
      |                 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...