不要读错题目了,不是乘方关系,是倍数关系,开始就是读错了
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
string s;
int len,i,j,num;
while(cin>>s)
{
num=0;
len=s.size();
for(i=0;i<len;i++){
num+=s[i]-'0';
}
if(s[len-1]-'0'==0||s[len-1]-'0'==5)
printf("YES\n");
else
if((s[len-1]-'0')%2==0)
printf("YES\n");
else if(num%3==0)
printf("YES\n");
else printf("NO\n");
}
return 0;
}