File size: 1,895 Bytes
2ab7a4a
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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
long long gcd(long long a, long long b)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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
    if (a == 0)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
        return b;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0
        return gcd(b%a, a);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`1`1`1`0`0`1`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
    int n; cin >> n;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`0`0`0`0`0`0`0`0`0`1`3`1`5`0`0`0`0`0`0`0`0`0
    int pos = 1;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`1
    for (int i = 1; i < n-1; ++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0
        pos += i; pos%=n;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`2`2`0`0
        cout << pos << ' ';`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`1`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`1
    pos += n-1; pos%=n; cout << pos << endl;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`6`1`1`0`0`0`0`0`0`0`0`8`0`8`0`0`0`1`0`2`3`0`0