dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; public class GFG { static void printModulus ( int X , int Y ) { int d = Math . Abs ( X - Y ) ; int i = 1 ; while ( i * i <= d ) { if ( d % i == 0 ) { Console . Write ( i + " ▁ " ) ; if ( d / i != i ) Console . Write ( d / i + " ▁ " ) ; } i ++ ; } } public static void Main ( String [ ] args ) { int X = 10 ; int Y = 26 ; printModulus ( X , Y ) ; } }

Accumulator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool difSquare ( int n ) { if ( n % 4 != 2 ) { return true ; } return false ; } public static void Main ( ) { int n = 45 ; if ( difSquare ( n ) ) { Console . Write ( " Yes STRNEWLINE " ) ; } else { Console . Write ( " No STRNEWLINE " ) ; } } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void createHash ( HashSet < int > hash , int maxElement ) { int prev = 0 , curr = 1 ; hash . Add ( prev ) ; hash . Add ( curr ) ; while ( curr <= maxElement ) { int temp = curr + prev ; hash . Add ( temp ) ; prev = curr ; curr = temp ; } } static int countFibonacciDivisors ( int n ) { HashSet < int > hash = new HashSet < int > ( ) ; createHash ( hash , n ) ; int cnt = 0 ; for ( int i = 1 ; i <= Math . Sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) { if ( ( n / i == i ) && ( hash . Contains ( n / i ) ) ) cnt ++ ; else { if ( hash . Contains ( n / i ) ) cnt ++ ; if ( hash . Contains ( n / ( n / i ) ) ) cnt ++ ; } } } return cnt ; } public static void Main ( String [ ] args ) { int n = 12 ; Console . Write ( countFibonacciDivisors ( n ) ) ; } }

Accumulator variables: cnt, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { class Node { public int data ; public Node left , right ; } ; static int res ; static int k ; static Node newNode ( int data ) { Node newNode = new Node ( ) ; newNode . data = data ; newNode . left = null ; newNode . right = null ; return newNode ; } static int rec ( Node root ) { if ( root == null ) { return 0 ; } xr ^= rec ( root . left ) ; xr ^= rec ( root . right ) ; if ( xr == k ) { res ++ ; } return xr ; } static int findCount ( Node root , int K ) { res = 0 ; k = K ; rec ( root ) ; return res ; } public static void Main ( String [ ] args ) { Node root = newNode ( 2 ) ; root . left = newNode ( 1 ) ; root . right = newNode ( 9 ) ; root . left . left = newNode ( 10 ) ; root . left . right = newNode ( 5 ) ; int K = 5 ; Console . WriteLine ( findCount ( root , K ) ) ; } }

Accumulator variables: res, xr
Class/struct names: GFG, Node
C# program:
using System ; class GFG { static void makearrayequal ( int [ ] arr , int n ) { int x = 0 ; for ( int i = 0 ; i < n ; i ++ ) { x += ( arr [ i ] & 1 ) ; } Console . WriteLine ( Math . Min ( x , n - x ) ) ; } public static void Main ( string [ ] args ) { int [ ] arr = { 4 , 3 , 2 , 1 } ; int n = arr . Length ; makearrayequal ( arr , n ) ; } }

Index/key variables: i
Accumulator variables: i, x
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countDigit ( int n ) { int temp = n , count = 0 ; while ( temp != 0 ) { int d = temp % 10 ; temp /= 10 ; if ( d == 2 d == 3 d == 5 d == 7 ) count ++ ; } return count ; } public static void Main ( string [ ] args ) { int n = 1234567890 ; Console . WriteLine ( countDigit ( n ) ) ; } }

Accumulator variables: count, temp
Class/struct names: GFG
C# program:
using System ; class GFG { static string permutation ( int [ ] arr , int N ) { int [ ] hash = new int [ N + 1 ] ; for ( int i = 0 ; i < N ; i ++ ) { hash [ arr [ i ] ] ++ ; } for ( int i = 1 ; i <= N ; i ++ ) { if ( hash [ i ] != 1 ) return " No " ; } return " Yes " ; } public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 1 , 5 , 5 , 3 } ; int n = arr . Length ; Console . Write ( permutation ( arr , n ) + " STRNEWLINE " ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; using System . Linq ; class GFG { static String check ( int [ ] arr , int n ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == 1 ) count ++ ; } if ( count == 1 ) return " Odd " ; else return " Even " ; } public static void Main ( String [ ] args ) { int [ ] arr = { 3 , 9 , 12 , 13 , 15 } ; int n = arr . Length ; Console . Write ( check ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int N = 100005 ; static void SieveOfEratosthenes ( bool [ ] prime , int p_size ) { prime [ 0 ] = false ; prime [ 1 ] = false ; for ( int p = 2 ; p * p <= p_size ; p ++ ) { if ( prime [ p ] ) { for ( int i = p * 2 ; i <= p_size ; i += p ) prime [ i ] = false ; } } } static int longestPrimeSubsequence ( int [ ] arr , int n ) { bool [ ] prime = new bool [ N + 1 ] ; for ( int i = 0 ; i < N + 1 ; i ++ ) prime [ i ] = true ; SieveOfEratosthenes ( prime , N ) ; int answer = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( prime [ arr [ i ] ] ) { answer ++ ; } } return answer ; } public static void Main ( String [ ] args ) { int [ ] arr = { 3 , 4 , 11 , 2 , 9 , 21 } ; int n = arr . Length ; Console . Write ( longestPrimeSubsequence ( arr , n ) + " STRNEWLINE " ) ; } }

Index/key variables: i, p
Accumulator variables: answer, i, p
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; public class GFG { static String even_or_odd ( String N ) { int len = N . Length ; if ( N [ len - 1 ] == '0' N [ len - 1 ] == '2' N [ len - 1 ] == '4' N [ len - 1 ] == '6' ) return ( " Even " ) ; else return ( " Odd " ) ; } public static void Main ( String [ ] args ) { String N = "735" ; Console . Write ( even_or_odd ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double dydx ( double x , double y ) { return ( x + y - 2 ) ; } static double rungeKutta ( double x0 , double y0 , double x , double h ) { int n = ( int ) ( ( x - x0 ) / h ) ; double k1 , k2 ; double y = y0 ; for ( int i = 1 ; i <= n ; i ++ ) { k1 = h * dydx ( x0 , y ) ; k2 = h * dydx ( x0 + 0.5 * h , y + 0.5 * k1 ) ; y = y + ( 1.0 / 6.0 ) * ( k1 + 2 * k2 ) ; x0 = x0 + h ; } return y ; } public static void Main ( string [ ] args ) { double x0 = 0 , y = 1 , x = 2 , h = 0.2 ; Console . WriteLine ( rungeKutta ( x0 , y , x , h ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int size = 10001 ; static long [ ] fib = new long [ 100010 ] ; static int [ ] freq = new int [ 100010 ] ; static bool isPerfectSquare ( int x ) { int s = ( int ) Math . Sqrt ( x ) ; return ( s * s == x ) ; } static int isFibonacci ( int n ) { if ( isPerfectSquare ( 5 * n * n + 4 ) || isPerfectSquare ( 5 * n * n - 4 ) ) return 1 ; return 0 ; } static void compute ( int a , int b ) { for ( int i = 1 ; i < 100010 ; i ++ ) { fib [ i ] = isFibonacci ( i ) ; } for ( int x = 1 ; x < 100010 ; x ++ ) { for ( int y = 1 ; y < size ; y ++ ) { if ( fib [ x ] == 1 && fib [ y ] == 1 && a * x + b * y < 100010 ) { freq [ a * x + b * y ] ++ ; } } } } public static void Main ( String [ ] args ) { int Q = 2 , A = 5 , B = 10 ; compute ( A , B ) ; int [ ] arr = { 50 , 150 } ; for ( int i = 0 ; i < Q ; i ++ ) { Console . Write ( freq [ arr [ i ] ] + " ▁ " ) ; } } }

Index/key variables: i, x, y
Accumulator variables: i, x, y
Iterator variables: i, x, y
Class/struct names: GFG
C# program:
using System ; class GFG { static int MAX = 100 ; static int max_element ( int [ ] arr , int pos ) { int tmp = arr [ 0 ] ; int ind = 0 ; for ( int i = 1 ; i < pos ; i ++ ) { if ( tmp < arr [ i ] ) { tmp = arr [ i ] ; ind = i ; } } return ind ; } static void findMaxSum ( int n1 , int n2 ) { int [ ] arr1 = new int [ MAX ] ; int [ ] arr2 = new int [ MAX ] ; int l1 = 0 , l2 = 0 ; int max1 = Math . Max ( n1 , n2 ) ; int min1 = Math . Min ( n1 , n2 ) ; for ( int i = max1 ; i > 0 ; i /= 10 ) arr1 [ l1 ++ ] = ( i % 10 ) ; for ( int i = min1 ; i > 0 ; i /= 10 ) arr2 [ l2 ++ ] = ( i % 10 ) ; int f = 0 ; if ( l1 != l2 ) { int index = ( max_element ( arr2 , l2 ) ) ; for ( int i = l1 - 1 ; i > ( l2 - 1 ) ; i -- ) { if ( arr1 [ i ] < arr2 [ index ] ) { int tmp = arr1 [ i ] ; arr1 [ i ] = arr2 [ index ] ; arr2 [ index ] = tmp ; f = 1 ; break ; } } } if ( f != 1 ) { int index1 = 0 , index2 = 0 ; int diff1 = 0 , diff2 = 0 ; for ( int i = l2 - 1 ; i >= 0 ; i -- ) { index1 = ( max_element ( arr1 , i ) ) ; index2 = ( max_element ( arr2 , i ) ) ; diff1 = ( arr2 [ index2 ] - arr1 [ i ] ) ; diff2 = ( arr1 [ index1 ] - arr2 [ i ] ) ; if ( diff1 > 0 diff2 > 0 ) { if ( diff1 > diff2 ) { int tmp = arr1 [ i ] ; arr1 [ i ] = arr2 [ index2 ] ; arr2 [ index2 ] = tmp ; break ; } else if ( diff2 > diff1 ) { int tmp = arr1 [ index1 ] ; arr1 [ index1 ] = arr2 [ i ] ; arr2 [ i ] = tmp ; break ; } else if ( diff1 == diff2 ) { if ( index1 <= index2 ) { int tmp = arr1 [ index1 ] ; arr1 [ index1 ] = arr2 [ i ] ; arr2 [ i ] = tmp ; break ; } else if ( index2 <= index1 ) { int tmp = arr1 [ i ] ; arr1 [ i ] = arr2 [ index2 ] ; arr2 [ index2 ] = tmp ; break ; } } } } } int f_n1 = 0 , f_n2 = 0 ; for ( int i = l1 - 1 ; i >= 0 ; i -- ) { f_n1 = ( f_n1 * 10 ) + arr1 [ i ] ; f_n2 = ( f_n2 * 10 ) + arr2 [ i ] ; } Console . Write ( f_n1 + f_n2 ) ; } public static void Main ( string [ ] args ) { int N1 = 9987 ; int N2 = 123 ; findMaxSum ( N1 , N2 ) ; } }

Index/key variables: MAX, i, index, index1, index2
Accumulator variables: i, l1, l2
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisible ( int n ) { int d ; while ( n / 100 > 0 ) { d = n % 10 ; n /= 10 ; n = Math . Abs ( n - ( d * 14 ) ) ; } return ( n % 47 == 0 ) ; } public static void Main ( ) { int N = 59173 ; if ( isDivisible ( N ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; public class GFG { static string even_or_odd ( string N ) { int len = N . Length ; if ( N [ len - 1 ] == '0' N [ len - 1 ] == '2' N [ len - 1 ] == '4' N [ len - 1 ] == '6' N [ len - 1 ] == '8' N [ len - 1 ] == ' A ' N [ len - 1 ] == ' C ' N [ len - 1 ] == ' E ' ) return ( " Even " ) ; else return ( " Odd " ) ; } static public void Main ( ) { string N = " AB3454D " ; Console . WriteLine ( even_or_odd ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisible ( int n ) { int d ; while ( ( n / 100 ) > 0 ) { d = n % 10 ; n /= 10 ; n = Math . Abs ( n - ( d * 3 ) ) ; } return ( n % 31 == 0 ) ; } public static void Main ( String [ ] args ) { int N = 1922 ; if ( isDivisible ( N ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisible ( int n ) { int d ; while ( n / 100 > 0 ) { d = n % 10 ; n /= 10 ; n = Math . Abs ( n + ( d * 13 ) ) ; } return ( n % 43 == 0 ) ; } public static void Main ( ) { int N = 2795 ; if ( isDivisible ( N ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; class GFG { static void print ( int n , int k ) { Console . Write ( k + " ▁ " ) ; for ( int i = 2 ; i <= n ; i ++ ) { int x = ( int ) ( Math . Pow ( k , i ) - Math . Pow ( k , i - 1 ) ) ; Console . Write ( x + " ▁ " ) ; } } public static void Main ( String [ ] args ) { int N = 3 , K = 4 ; print ( N , K ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisible ( int n ) { int d ; while ( n / 100 > 0 ) { d = n % 10 ; n /= 10 ; n = Math . Abs ( n - ( d * 7 ) ) ; } return ( n % 71 == 0 ) ; } public static void Main ( ) { int N = 5041 ; if ( isDivisible ( N ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; class GFG { static int countDigit ( int n ) { bool [ ] prime = new bool [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) prime [ i ] = false ; prime [ 2 ] = prime [ 3 ] = true ; prime [ 5 ] = prime [ 7 ] = true ; int temp = n , count = 0 ; while ( temp != 0 ) { int d = temp % 10 ; temp /= 10 ; if ( d > 0 && n % d == 0 && prime [ d ] == true ) count ++ ; } return count ; } public static void Main ( string [ ] args ) { int n = 1032 ; Console . WriteLine ( countDigit ( n ) ) ; } }

Index/key variables: d, i
Accumulator variables: count, i, temp
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int [ ] digit = new int [ 100000 ] ; static int findDigits ( int n ) { int count = 0 ; while ( n != 0 ) { digit [ count ] = n % 10 ; n = n / 10 ; ++ count ; } return count ; } static int OR_of_Digits ( int n , int count ) { int ans = 0 ; for ( int i = 0 ; i < count ; i ++ ) { ans = ans | digit [ i ] ; } return ans ; } static int AND_of_Digits ( int n , int count ) { int ans = 0 ; for ( int i = 0 ; i < count ; i ++ ) { ans = ans & digit [ i ] ; } return ans ; } static int XOR_of_Digits ( int n , int count ) { int ans = 0 ; for ( int i = 0 ; i < count ; i ++ ) { ans = ans ^ digit [ i ] ; } return ans ; } static void bitwise_operation ( int N ) { int countOfDigit = findDigits ( N ) ; Console . Write ( " XOR ▁ = ▁ " + XOR_of_Digits ( N , countOfDigit ) + " STRNEWLINE " ) ; Console . Write ( " OR ▁ = ▁ " + OR_of_Digits ( N , countOfDigit ) + " STRNEWLINE " ) ; Console . Write ( " AND ▁ = ▁ " + AND_of_Digits ( N , countOfDigit ) + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { int N = 123456 ; bitwise_operation ( N ) ; } }

Index/key variables: count, i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int maxLength ( int [ ] arr , int N ) { int product = 1 , len = 0 ; for ( int i = 0 ; i < N ; i ++ ) { product *= arr [ i ] ; } if ( product >= 0 ) { return N ; } for ( int i = 0 ; i < N ; i ++ ) { if ( arr [ i ] < 0 ) { len = Math . Max ( len , Math . Max ( N - i - 1 , i ) ) ; } } return len ; } public static void Main ( ) { int [ ] arr = { - 1 , 1 , 1 , - 2 , 3 , 2 , - 1 } ; int N = arr . Length ; Console . WriteLine ( maxLength ( arr , N ) ) ; } }

Index/key variables: i
Accumulator variables: i, product
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static void findRoots ( int b , int c ) { int a = 1 ; int d = b * b - 4 * a * c ; double sqrt_val = Math . Sqrt ( Math . Abs ( d ) ) ; if ( d > 0 ) { double x = - b + sqrt_val ; double y = - b - sqrt_val ; int root1 = ( int ) ( x ) / ( 2 * a ) ; int root2 = ( int ) ( y ) / ( 2 * a ) ; if ( root1 + root2 == - 1 * b && root1 * root2 == c ) Console . Write ( root1 + " , ▁ " + root2 ) ; else Console . Write ( - 1 ) ; } else if ( d == 0 ) { int root = - b / ( 2 * a ) ; if ( root + root == - 1 * b && root * root == c ) Console . Write ( root + " , ▁ " + root ) ; else Console . Write ( - 1 ) ; } else { Console . Write ( - 1 ) ; } Console . WriteLine ( ) ; } public static void Main ( string [ ] args ) { int S = 5 , P = 6 ; findRoots ( - S , P ) ; S = 5 ; P = 9 ; findRoots ( - S , P ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void findNumbers ( int N ) { int i = 1 ; while ( i <= N ) { Console . Write ( ( i * i * i ) + " ▁ " ) ; i ++ ; } } public static void Main ( string [ ] args ) { int N = 4 ; findNumbers ( N ) ; } }

Accumulator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int properDivisorSum ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; ++ i ) { for ( int j = 1 ; j * j <= i ; ++ j ) { if ( i % j == 0 ) { if ( i / j == j ) sum += j ; else sum += j + i / j ; } } sum = sum - i ; } return sum ; } public static void Main ( string [ ] args ) { int n = 4 ; Console . WriteLine ( properDivisorSum ( n ) ) ; n = 5 ; Console . WriteLine ( properDivisorSum ( n ) ) ; } }

Accumulator variables: sum
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int properDivisorSum ( int n ) { int sum = 0 ; int i ; for ( i = 1 ; i <= n ; ++ i ) sum += ( n / i ) * i ; return sum - n * ( n + 1 ) / 2 ; } public static void Main ( String [ ] args ) { int n = 4 ; Console . WriteLine ( properDivisorSum ( n ) ) ; n = 5 ; Console . WriteLine ( properDivisorSum ( n ) ) ; } }

Accumulator variables: sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findMinimumOperation ( int n , int d , int [ , ] arrays ) { int cnt = 0 ; int first = int . MinValue , end = int . MaxValue ; while ( n > 0 ) { int [ ] arr = { arrays [ cnt , 0 ] , arrays [ cnt , 1 ] } ; Array . Sort ( arr ) ; first = Math . Max ( first , arr [ 0 ] ) ; end = Math . Min ( end , arr [ 1 ] ) ; cnt ++ ; n -- ; } if ( first > end ) Console . Write ( " - 1" ) ; else { if ( d >= first && d <= end ) { Console . Write ( "0" ) ; } else Console . Write ( Math . Min ( Math . Abs ( first - d ) , Math . Abs ( d - end ) ) ) ; } } public static void Main ( String [ ] args ) { int n = 3 , d = 3 ; int [ , ] arrays = { { 0 , 7 } , { 2 , 14 } , { 4 , 6 } } ; findMinimumOperation ( n , d , arrays ) ; } }

Accumulator variables: cnt, n
Class/struct names: GFG
C# program:
using System ; class GFG { static long mod = 1000000007L ; static long mult ( long a , long b ) { return ( ( a % mod ) * ( b % mod ) ) % mod ; } static long calculate_factors ( long n ) { long ans , cnt ; cnt = 0 ; ans = 1 ; while ( n % 2 == 0 ) { cnt ++ ; n = n / 2 ; } if ( cnt % 2 == 1 ) { ans = mult ( ans , ( cnt + 1 ) ) ; } for ( int i = 3 ; i <= Math . Sqrt ( n ) ; i += 2 ) { cnt = 0 ; while ( n % i == 0 ) { cnt ++ ; n = n / i ; } if ( cnt % 2 == 1 ) { ans = mult ( ans , ( cnt + 1 ) ) ; } } if ( n > 2 ) { ans = mult ( ans , ( 2 ) ) ; } return ans % mod ; } public static void Main ( String [ ] args ) { long n = 193748576239475639L ; mod = 17 ; Console . Write ( calculate_factors ( n ) + " STRNEWLINE " ) ; } }

Accumulator variables: cnt, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void maxValue ( int a ) { String c = Convert . ToString ( a , 2 ) ; String b = " " ; for ( int i = 0 ; i < c . Length ; i ++ ) { if ( ( c [ i ] - '0' ) == 1 ) b += '0' ; else b += '1' ; } Console . Write ( Convert . ToInt32 ( b , 2 ) ) ; } public static void Main ( String [ ] args ) { int a = 4 ; maxValue ( a ) ; } }

Index/key variables: i
Accumulator variables: b, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int sz = ( int ) 1e5 ; static bool [ ] isPrime = new bool [ sz + 1 ] ; static void generatePrime ( ) { int i , j ; for ( i = 2 ; i <= sz ; i ++ ) isPrime [ i ] = true ; for ( i = 2 ; i * i <= sz ; i ++ ) { if ( isPrime [ i ] ) { for ( j = i * i ; j < sz ; j += i ) { isPrime [ j ] = false ; } } } } static void Pair_of_PrimeXor ( int [ ] A , int n ) { for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { if ( isPrime [ ( A [ i ] ^ A [ j ] ) ] ) { Console . Write ( " ( " + A [ i ] + " , ▁ " + A [ j ] + " ) ▁ " ) ; } } } } public static void Main ( String [ ] args ) { int [ ] A = { 1 , 3 , 6 , 11 } ; int n = A . Length ; generatePrime ( ) ; Pair_of_PrimeXor ( A , n ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void getnumbers ( int n ) { List < int > divisor = new List < int > ( ) ; for ( int i = 2 ; i * i <= n ; i ++ ) { while ( n % i == 0 ) { divisor . Add ( i ) ; n /= i ; } } if ( n != 1 ) { divisor . Add ( n ) ; } int a , b , c , size ; a = b = c = 1 ; size = divisor . Count ; for ( int i = 0 ; i < size ; i ++ ) { if ( a == 1 ) { a = a * divisor [ i ] ; } else if ( b == 1 b == a ) { b = b * divisor [ i ] ; } else { c = c * divisor [ i ] ; } } if ( a == 1 b == 1 c == 1 a == b b == c a == c ) { Console . Write ( " - 1" + " STRNEWLINE " ) ; } else { Console . Write ( a + " ▁ " + b + " ▁ " + c + " STRNEWLINE " ) ; } } public static void Main ( String [ ] args ) { int n = 64 ; getnumbers ( n ) ; } }

Index/key variables: i
Accumulator variables: i, n
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static List < int > primeFactors ( int n ) { int i ; List < int > Prime = new List < int > ( ) ; if ( n % 2 == 0 ) { Prime . Add ( 2 ) ; } while ( n % 2 == 0 ) { n = n / 2 ; } for ( i = 3 ; i <= Math . Sqrt ( n ) ; i = i + 2 ) { if ( n % i == 0 ) { Prime . Add ( i ) ; } while ( n % i == 0 ) { n = n / i ; } } if ( n > 2 ) { Prime . Add ( n ) ; } return Prime ; } static void checkDistinctPrime ( int n ) { List < int > Prime = primeFactors ( n ) ; int product = 1 ; foreach ( int i in Prime ) { product *= i ; } if ( product == n ) Console . Write ( " YES " ) ; else Console . Write ( " NO " ) ; } public static void Main ( String [ ] args ) { int N = 30 ; checkDistinctPrime ( N ) ; } }

Accumulator variables: product
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; public class GFG { static double nthRoot ( int A , int N ) { Random r = new Random ( ) ; double xPre = r . Next ( 0 , 9 ) ; double eps = 1e-3 ; double delX = int . MaxValue ; double xK = 0 ; while ( delX > eps ) { xK = ( ( N - 1.0 ) * xPre + ( double ) A / Math . Pow ( xPre , N - 1 ) ) / ( double ) N ; delX = Math . Abs ( xK - xPre ) ; xPre = xK ; } return xK ; } static int countPowers ( int a , int b , int k ) { return ( int ) ( Math . Floor ( nthRoot ( b , k ) ) - Math . Ceiling ( nthRoot ( a , k ) ) + 1 ) ; } public static void Main ( String [ ] args ) { int a = 7 , b = 28 , k = 2 ; Console . Write ( " Count ▁ of ▁ Powers ▁ is ▁ " + countPowers ( a , b , k ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int n ) { for ( int i = 2 ; i * i <= n ; i ++ ) { if ( n % i == 0 ) { return false ; } } return true ; } static void printMinCountPrime ( int N ) { int minCount ; if ( isPrime ( N ) ) { minCount = 1 ; } else if ( N % 2 == 0 ) { minCount = 2 ; } else { if ( isPrime ( N - 2 ) ) { minCount = 2 ; } else { minCount = 3 ; } } Console . WriteLine ( minCount + " STRNEWLINE " ) ; } public static void Main ( string [ ] args ) { int N = 100 ; printMinCountPrime ( N ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int INFINITY_ = 9999999 ; static int sqrtBylongDivision ( int n ) { int cur_divisor = 0 ; int quotient_units_digit = 0 ; int cur_quotient = 0 ; int cur_dividend = 0 ; int cur_remainder = 0 ; int [ ] a = new int [ 10 ] ; while ( n > 0 ) { a [ i ] = n % 100 ; n = n / 100 ; i ++ ; } i -- ; for ( j = i ; j >= 0 ; j -- ) { cur_remainder = INFINITY_ ; cur_dividend = cur_dividend * 100 + a [ j ] ; for ( udigit = 0 ; udigit <= 9 ; udigit ++ ) { if ( cur_remainder >= cur_dividend - ( ( cur_divisor * 10 + udigit ) * udigit ) && cur_dividend - ( ( cur_divisor * 10 + udigit ) * udigit ) >= 0 ) { cur_remainder = cur_dividend - ( ( cur_divisor * 10 + udigit ) * udigit ) ; quotient_units_digit = udigit ; } } cur_quotient = cur_quotient * 10 + quotient_units_digit ; cur_divisor = cur_quotient * 2 ; cur_dividend = cur_remainder ; } return cur_quotient ; } public static void Main ( String [ ] args ) { int x = 1225 ; Console . Write ( sqrtBylongDivision ( x ) + " STRNEWLINE " ) ; } }

Index/key variables: i, j
Accumulator variables: i, j, udigit
Iterator variables: j, udigit
Class/struct names: GFG