- 小菜的数码验证
- 2015-08-04 11:15:24 @
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
//freopen("1.txt","r",stdin);
//freopen("2.txt","w",stdout);
int a[110],len,s=0;char ss[110];
scanf("%s",ss+1);len=strlen(ss+1);
for(int i=1;i<=len;i++)
{
a[i]=ss[i]-'0';
s+=a[i];
}
if(a[len]%2==0) cout<<"1"<<endl;
else cout<<"0"<<endl;
if(s%3==0) cout<<"1"<<endl;
else cout<<"0"<<endl;
if((a[len]+a[len-1]*10)%4==0) cout<<"1"<<endl;
else cout<<"0"<<endl;
if((a[len]+a[len-1]*10+a[len-2]*100)%8==0) cout<<"1"<<endl;
else cout<<"0"<<endl;
if(a[len]==0 || a[len]==1 || a[len]==4 || a[len]==5 || a[len]==6 || a[len]==9) cout<<"1";
else cout<<"0";
}