(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.

제출 #991666

#제출 시각아이디문제언어결과실행 시간메모리
991666gutzzyVepar (COCI21_vepar)C++14
30 / 70
8 ms656 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int count(int n, int p){ int c = 0; while(n>0){ n /= p; c += n; } return c; } int32_t main(){ int t,a,b,c,d; cin >> t; vector<int> prime; for(int i=2;i<100000;i++){ bool p = true; for(int j=2;j*j<=i;j++){ if(i%j==0){ p = false; break; } } if(p) prime.push_back(i); } while(t--){ cin >> a >> b >> c >> d; bool ans = true; for(auto pr:prime){ if(count(b,pr)-count(a-1,pr)>count(d,pr)-count(c-1,pr)){ ans = false; break; } } if(ans) cout << "DA" << endl; else cout << "NE" << endl; } return 0; }
#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...