提交时间:2024-05-12 16:12:18
运行 ID: 47128
#include<bits/stdc++.h> using namespace std; int main(){ /*int g,m,x; cout<<std::left<<setw(5)<<"公鸡"; cout<<std::left<<setw(5)<<"母鸡"; cout<<std::left<<setw(5)<<"小鸡"<<endl; for(int i = 1;i<=100/3;i++){ for(int j = 1;j<=100-i;j++){ for(int k = 1;k<=100-i-j;k++){ if((i*3+j*2+k/3)==100&&(i+j+k)==100&&k%3==0){ cout<<std::left<<setw(5)<<i; cout<<std::left<<setw(5)<<j; cout<<std::left<<setw(5)<<k<<endl; } } } } double h,a = 0,b = 0; cin>>h; for(int i = 1;i<=10;i++){ a = a+h+b; b = h*0.5; h = b; } cout<<a<<endl; cout<<b; long long n,k,cnt = 0; cin>>n>>k; for(int i = 1;i<=n;i++){ if(i%k==0) cnt++; } cout<<cnt; int n = 0; while(cin>>n){ for(int i = 1;i<=n;i++){ for(int j = 1;j<=n;j++){ if((i==j)||(i+j==n+1)){ cout<<"x"; }else{ cout<<" "; } } cout<<endl; } cout<<endl; } int n = 0; cin>>n; for(int i = 1;i<=n*2-1;i++){ for(int j = 1;j<=n*2-1;j++){ cout<<"*"; } cout<<endl; } string s; int cnt; cin>>s; int len = s.size(); for(int i = 0;i<len;i++){ cnt+=s[i]-'0'; } cout<<cnt; float n,m; cin>>n; while((n-int(n))!=0){ n*=10; } cout<<n;*/ int x,y; cin>>x>>y; for(int i = 1000;i>=2;i--){ if(i%x!=0&&i%y!=0){ cout<<i; break; } } return 0; }