//1
#include<stdio.h>
int main(){
int a,b,t=0;
long sum=0;
scanf("%d%d",&a,&b);
sum=a*b;
int s[10];
while(sum){
s[t++]=sum%10;
sum/=10;
}
int c=0;
for(int i=0;i<t;i++){
c=c*10+s[i];
}
printf("%d",c);
return 0;
}
//2
#include<stdio.h>
int main(){
int n,d=-1;
scanf("%d",&n);
int s[100000]={0};
int t;
for(int i=1;i<=n;i++){
t=(i/2+i/3+i/5);
s[t]++;
if(t>d) d=t;
}
int cnt=0;
for(int i=0;i<=d;i++){
if(s[i]!=0) cnt++;
}
printf("%d",cnt);
return 0;
}
//3
//1)
#include<bits/stdc++.h>
using namespace std;
int m,x,y;
void print(double t){
if(m==t) printf(" Ping");
else if(m<t) printf(" Cong");
else printf(" Gai");
}
int main(){
scanf("%d%d%d",&m,&x,&y);
for(int i=99;i>=10;i--){
int j=i%10*10+i/10;
double k=abs(j-i)*1.0/x; //abs为求浮点数的函数!!!
if(j==k*y){
cout<<i;
print(i);print(j);print(k);
return 0;
}
}
printf("No Solution");
return 0;
}
//2)
#include<bits/stdc++.h>
using namespace std;
int main(){
int m,x,y;
scanf("%d%d%d",&m,&x,&y);
for(int i=9;i>0;i--){
for(int j=9;j>=0;j--){
int jia=i*10+j,yi=j*10+i;
if(fabs(jia-yi)*y==x*yi){ //fabs()为求浮点数 的函数
double bing=1.0*yi/y;
string s1=jia>m?" Cong":(jia==m?" Ping":" Gai");
string s2=yi>m?" Cong":(yi==m?" Ping":" Gai");
string s3=bing>m?" Cong":(bing==m?" Ping":" Gai");
cout<<jia<<s1<<s2<<s3;
return 0;
}
}
}
cout<<"No Solution";
return 0;
}
//4
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
scanf("%d",&n);
vector<int> v(n+1);
for(int i=1;i<=n;i++)
scanf("%d",&v[i]);
for(int i=1;i<=n;i++){
for(int j=i+1;j<=n;j++){
vector<int> lie,a(n+1,1);
a[i]=a[j]=-1;
for(int k=1;k<=n;k++)
if(v[k]*a[abs(v[k])]<0) lie.push_back(k);
if(lie.size()==2&&a[lie[0]]+a[lie[1]]==0){
printf("%d %d",i,j);
return 0;
}
}
}
cout<<"No Solution";
return 0;
}
//5
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,t1,t2;
map<int,vector<int> > m;
scanf("%d%d",&n,&k);
for(int i=0;i<n;i++){
scanf("%d%d",&t1,&t2);
m[t1].push_back(t2);
m[t2].push_back(t1);
}
while(k--){
int cnt,flag=0,a[100000]={0};
scanf("%d",&cnt);
vector<int>v(cnt);
for(int i=0;i<cnt;i++){
scanf("%d",&v[i]);
a[v[i]]=1;
}
for(int i=0;i<v.size();i++)
for(int j=0;j<m[v[i]].size();j++)
if(a[m[v[i]][j]]==1) flag=1;
printf("%s\n",flag?"No":"Yes");
}
return 0;
}