1 #include<iostream> 2 #include<set> 3 using namespace std; 4 int main() 5 { 6 int s=0; 7 int F=479001600; 8 multiset<unsigned int> a; 9 int n; 10 while(cin>>n) 11 { 12 if(F%n==0) 13 { 14 multiset<unsigned int>::iterator v=a.find(F/n); 15 if(v!=a.end()) 16 { 17 s++; 18 a.erase(v); 19 } 20 else 21 a.insert(n); 22 } 23 if(cin.get()==‘\0‘) 24 { 25 break; 26 } 27 } 28 cout<<s<<endl; 29 return 0; 30 }
1017 12!配 对
时间: 2024-10-09 06:11:50