File size: 2,224 Bytes
da6962b
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
code`block`FunctionDecl`FunctionDeclRec`ForStmt`ForStmtRec`DoStmt`DoStmtRec`WhileStmt`WhileStmtRec`IfStmt`IfStmtRec`SwitchStmt`SwitchStmtRec`countBlocks`countBlocksRec`countCondition`countVariable`countLiteral`IntegerLiteral`StringLiteral`IfStmt`ForStmt`WhileStmt`DoStmt`SwitchStmt`countLoop`VarDecl`DeclRefExpr`DeclStmt`countDecl`countPointer`writeFunction`CallExpr`BinaryOperator`UnaryOperator`CompoundAssignOperator`countOperand`ArraySubscriptE`RealFaultLocation

bool isluckynumber(ll a){`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0
    while(a){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`2`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`0`0`0`0`1

        int r = a%10;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`2`1`1`1`0`0`0`0`0`0`0`1`1`1`3`0`0`0`1`0`0`1`0`0
        if(r!=4&&r!=7)return false;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`6`2`3`2`0`1`0`0`0`0`0`0`2`0`2`0`0`0`3`0`0`3`0`0

        a/=10;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`2`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`0
    }return true;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`2`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0

int main(){`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0
    char x;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0

    while((x=getchar())!=EOF){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`1`1`0`0`0`1`0`0`1`0`2`0`2`0`0`1`2`1`0`3`0`0
        if(x=='\n')break;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0

        if(x=='4'||x=='7')count++;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`3`2`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`3`1`0`4`0`0
    }printf((isluckynumber(count))?"YES\n":"NO\n");`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`0`2`0`0`0`0`0`0`0`3`0`3`0`1`2`0`0`0`0`0`0

    return 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0