(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #808526

#제출 시각아이디문제언어결과실행 시간메모리
808526tlnk07Vepar (COCI21_vepar)C++17
30 / 70
420 ms1544 KiB
#include<bits/stdc++.h> using namespace std; #define int long long long long t, a, b, c, d, s, s1; vector<int> prime; int calc(int u,int v) { int k = 0; while (u) { k += u/v; u /= v; } return k; } signed main() { for(int i = 2; i <= 1000000; ++i) { bool check = 0; for(int j = 2; j * j <= i; ++j) { if(i % j == 0) { check = 1; break; } } if(!check) prime.push_back(i); } cin >> t; while(t--) { cin >> a >> b >> c >> d; bool check = 0; for (int u : prime) { if (calc(b, u) - calc(a - 1, u) > calc(d, u) - calc(c - 1, u)) { check = true; break; } } if(!check) cout << "DA\n"; else cout << "NE\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...