dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { static bool divisibleBy3 ( string number ) { int sumOfDigit = 0 ; for ( int i = 0 ; i < number . Length ; i ++ ) sumOfDigit += number [ i ] - '0' ; if ( sumOfDigit % 3 == 0 ) return true ; return false ; } static bool divisibleBy25 ( string number ) { if ( number . Length < 2 ) return false ; int length = number . Length ; int lastTwo = ( number [ length - 2 ] - '0' ) * 10 + ( number [ length - 1 ] - '0' ) ; if ( lastTwo % 25 == 0 ) return true ; return false ; } static bool divisibleBy75 ( string number ) { if ( divisibleBy3 ( number ) && divisibleBy25 ( number ) ) return true ; return false ; } public static void Main ( ) { string number = "754586672150" ; bool divisible = divisibleBy75 ( number ) ; if ( divisible ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Index/key variables: i
Accumulator variables: i, sumOfDigit
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int otherNumber ( int A , int Lcm , int Hcf ) { return ( Lcm * Hcf ) / A ; } static public void Main ( String [ ] args ) { int A = 8 , Lcm = 8 , Hcf = 1 ; int result = otherNumber ( A , Lcm , Hcf ) ; Console . WriteLine ( " B ▁ = ▁ " + result ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float successiveChange ( int [ ] arr , int N ) { float var1 , var2 , result = 0 ; var1 = arr [ 0 ] ; var2 = arr [ 1 ] ; result = var1 + var2 + ( ( var1 * var2 ) / 100 ) ; for ( int i = 2 ; i < N ; i ++ ) result = result + arr [ i ] + ( ( result * arr [ i ] ) / 100 ) ; return result ; } public static void Main ( ) { int [ ] arr = { 10 , 20 , 30 , 10 } ; int N = arr . Length ; float result = successiveChange ( arr , N ) ; Console . WriteLine ( " Percentage ▁ change ▁ is ▁ = ▁ " + result + " ▁ % " ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int minimumNumbers ( int n , int s ) { if ( ( s % n ) > 0 ) return s / n + 1 ; else return s / n ; } public static void Main ( ) { int n = 5 ; int s = 11 ; Console . WriteLine ( minimumNumbers ( n , s ) ) ; } }

Class/struct names: GFG
C# program:
class GFG { static int __gcd ( int a , int b ) { if ( b == 0 ) return a ; return __gcd ( b , a % b ) ; } static int sumAP ( int n , int d ) { n /= d ; return ( n ) * ( 1 + n ) * d / 2 ; } static int sumMultiples ( int A , int B , int n ) { n -- ; int common = ( A * B ) / __gcd ( A , B ) ; return sumAP ( n , A ) + sumAP ( n , B ) - sumAP ( n , common ) ; } public static void Main ( ) { int n = 100 , A = 5 , B = 10 ; System . Console . WriteLine ( " Sum ▁ = ▁ " + sumMultiples ( A , B , n ) ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int n ) { if ( n <= 1 ) return false ; for ( int i = 2 ; i <= Math . Sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) return false ; } return true ; } static bool isPossible ( int N ) { if ( isPrime ( N ) && isPrime ( N - 2 ) ) return true ; else return false ; } public static void Main ( ) { int n = 13 ; if ( isPossible ( n ) == true ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { public class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } } static int totalPairs ( int [ ] arr1 , int [ ] arr2 , int K , int n , int m ) { HashSet < pair > s = new HashSet < pair > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( arr1 [ i ] > arr2 [ j ] ) { if ( arr1 [ i ] % arr2 [ j ] == K ) s . Add ( new pair ( arr1 [ i ] , arr2 [ j ] ) ) ; } else { if ( arr2 [ j ] % arr1 [ i ] == K ) s . Add ( new pair ( arr2 [ j ] , arr1 [ i ] ) ) ; } } } return s . Count ; } public static void Main ( String [ ] args ) { int [ ] arr1 = { 8 , 3 , 7 , 50 } ; int [ ] arr2 = { 5 , 1 , 10 , 4 } ; int K = 3 ; int n = arr1 . Length ; int m = arr2 . Length ; Console . WriteLine ( totalPairs ( arr1 , arr2 , K , n , m ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG, pair
C# program:
using System ; class GFG { static int contiguousPerfectSquare ( int [ ] arr , int n ) { int a ; float b ; int current_length = 0 ; int max_length = 0 ; for ( int i = 0 ; i < n ; i ++ ) { b = ( float ) Math . Sqrt ( arr [ i ] ) ; a = ( int ) b ; if ( a == b ) current_length ++ ; else current_length = 0 ; max_length = Math . Max ( max_length , current_length ) ; } return max_length ; } public static void Main ( ) { int [ ] arr = { 9 , 75 , 4 , 64 , 121 , 25 } ; int n = arr . Length ; Console . WriteLine ( contiguousPerfectSquare ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: current_length, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countPairs ( int n ) { int count = 0 ; for ( int x = 1 ; x < n ; x ++ ) { for ( int y = x + 1 ; y <= n ; y ++ ) { if ( ( y * x ) % ( y + x ) == 0 ) count ++ ; } } return count ; } public static void Main ( ) { int n = 15 ; Console . WriteLine ( countPairs ( n ) ) ; } }

Accumulator variables: count, x, y
Iterator variables: x, y
Class/struct names: GFG
C# program:
using System ; class GFG { static int getIndex ( int [ ] a , int n ) { if ( n == 1 ) return 0 ; int ptrL = 0 , ptrR = n - 1 , sumL = a [ 0 ] , sumR = a [ n - 1 ] ; while ( ptrR - ptrL > 1 ) { if ( sumL < sumR ) { ptrL ++ ; sumL += a [ ptrL ] ; } else if ( sumL > sumR ) { ptrR -- ; sumR += a [ ptrR ] ; } else { break ; } } return ptrL ; } public static void Main ( ) { int [ ] a = { 2 , 7 , 9 , 8 , 7 } ; int n = a . Length ; Console . WriteLine ( getIndex ( a , n ) ) ; } }

Index/key variables: ptrL, ptrR
Accumulator variables: ptrL, ptrR, sumL, sumR
Class/struct names: GFG
C# program:
using System ; class GFG { static int getPosition ( int [ ] a , int n , int m ) { for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = ( a [ i ] / m + ( a [ i ] % m ) ) ; } int ans = - 1 , max = - 1 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( max < a [ i ] ) { max = a [ i ] ; ans = i ; } } return ans + 1 ; } static public void Main ( ) { int [ ] a = { 2 , 5 , 4 } ; int n = a . Length ; int m = 2 ; Console . WriteLine ( getPosition ( a , n , m ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int calcFunction ( int n , int r ) { int finalDenominator = 1 ; int mx = Math . Max ( r , n - r ) ; for ( int i = mx + 1 ; i <= n ; i ++ ) { int denominator = ( int ) Math . Pow ( i , i ) ; int numerator = ( int ) Math . Pow ( i - mx , i - mx ) ; finalDenominator = ( finalDenominator * denominator ) / numerator ; } return finalDenominator ; } public static void Main ( ) { int n = 6 , r = 2 ; Console . WriteLine ( "1 / " + calcFunction ( n , r ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class Solution { static Boolean isExists ( int [ ] arr , int n ) { Dictionary < int , int > m = new Dictionary < int , int > ( ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( m . ContainsKey ( arr [ i ] ) ) { var val = m [ arr [ i ] ] ; m . Remove ( arr [ i ] ) ; m . Add ( arr [ i ] , val + 1 ) ; } else { m . Add ( arr [ i ] , 1 ) ; } sum += arr [ i ] ; } if ( sum % 2 == 0 ) { if ( m [ sum / 2 ] != 0 ) return true ; } return false ; } public static void Main ( ) { int [ ] a = { 5 , 1 , 2 , 2 } ; int n = a . Length ; if ( isExists ( a , n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: Solution
C# program:
using System ; using System . Collections . Generic ; class GFG { static SortedSet < int > st = new SortedSet < int > ( ) ; static void generateNumbers ( int n , int num , int a , int b ) { if ( num > 0 && num < n ) st . Add ( num ) ; if ( num >= n ) return ; if ( num * 10 + a > num ) generateNumbers ( n , num * 10 + a , a , b ) ; generateNumbers ( n , num * 10 + b , a , b ) ; } static void printNumbers ( int n ) { for ( int i = 0 ; i <= 9 ; i ++ ) for ( int j = i + 1 ; j <= 9 ; j ++ ) generateNumbers ( n , 0 , i , j ) ; Console . Write ( " The ▁ numbers ▁ are : ▁ " ) ; foreach ( int obj in st ) Console . Write ( obj + " ▁ " ) ; st . Clear ( ) ; } public static void Main ( String [ ] args ) { int n = 12 ; printNumbers ( n ) ; } }

Accumulator variables: i, j
Iterator variables: i, j, obj
Class/struct names: GFG
C# program:
using System ; using System . Collections ; using System . Collections . Generic ; class GFG { static ArrayList findPrime ( int MAX ) { bool [ ] pm = new bool [ MAX + 1 ] ; for ( int i = 0 ; i < MAX + 1 ; i ++ ) pm [ i ] = true ; pm [ 0 ] = pm [ 1 ] = false ; for ( int i = 2 ; i <= MAX ; i ++ ) if ( pm [ i ] ) for ( int j = 2 * i ; j <= MAX ; j += i ) pm [ j ] = false ; ArrayList prime = new ArrayList ( ) ; for ( int i = 0 ; i <= MAX ; i ++ ) if ( pm [ i ] ) prime . Add ( i ) ; return prime ; } static int max_element ( int [ ] arr ) { int max = arr [ 0 ] ; for ( int i = 0 ; i < arr . Length ; i ++ ) max = Math . Max ( max , arr [ i ] ) ; return max ; } static int findSmallest ( int [ ] arr , int n ) { int MAX = max_element ( arr ) ; ArrayList prime = findPrime ( MAX ) ; HashSet < int > s = new HashSet < int > ( ) ; for ( int i = 0 ; i < arr . Length ; i ++ ) s . Add ( arr [ i ] ) ; int ans = - 1 ; for ( int i = 0 ; i < prime . Count ; i ++ ) { if ( ! s . Contains ( ( int ) prime [ i ] ) ) { ans = ( int ) ( prime [ i ] ) ; break ; } } return ( int ) ans ; } static void Main ( ) { int [ ] arr = { 3 , 0 , 1 , 2 , 7 } ; int n = arr . Length ; if ( findSmallest ( arr , n ) == - 1 ) Console . Write ( " No ▁ prime ▁ number ▁ missing " ) ; else Console . Write ( findSmallest ( arr , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int findNum ( int [ ] div , int [ ] rem , int N ) { int num = rem [ N - 1 ] ; for ( int i = N - 2 ; i >= 0 ; i -- ) { num = num * div [ i ] + rem [ i ] ; } return num ; } static public void Main ( ) { int [ ] div = { 8 , 3 } ; int [ ] rem = { 2 , 2 } ; int N = div . Length ; Console . WriteLine ( findNum ( div , rem , N ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void profitLoss ( int N , int M ) { if ( N == M ) Console . Write ( " No ▁ Profit ▁ nor ▁ Loss " ) ; else { float result = 0 ; result = ( float ) ( Math . Abs ( N - M ) ) / M ; if ( N - M < 0 ) Console . Write ( " Loss ▁ = ▁ - " + result * 100 + " % " ) ; else Console . Write ( " Profit ▁ = ▁ " + result * 100 + " % " ) ; } } static public void Main ( ) { int N = 8 , M = 9 ; profitLoss ( N , M ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static String convert_to_words ( char [ ] num ) { int len = num . Length ; if ( len == 0 len > 4 ) { return " " ; } String [ ] single_digits_temp = { " " , " one " , " two " , " three " , " four " , " five " , " six " , " seven " , " eight " , " nine " } ; String [ ] single_digits = { " " , " first " , " second " , " third " , " fourth " , " fifth " , " sixth " , " seventh " , " eighth " , " ninth " } ; String [ ] two_digits = { " " , " tenth " , " eleventh " , " twelfth " , " thirteenth " , " fourteenth " , " fifteenth " , " sixteenth " , " seventeenth " , " eighteenth " , " nineteenth " } ; String [ ] tens_multiple = { " " , " tenth " , " twentieth " , " thirtieth " , " fortieth " , " fiftieth " , " sixtieth " , " seventieth " , " eightieth " , " ninetieth " } ; String [ ] tens_power = { " hundred " , " thousand " } ; String word = " " ; if ( len == 1 ) { word += single_digits [ num [ 0 ] - '0' ] ; return word ; } int i = 0 , ctr = 0 ; String s = " ▁ " ; while ( i < len ) { if ( len >= 3 ) { if ( num [ i ] != '0' ) { word += single_digits_temp [ num [ i ] - '0' ] + " ▁ " ; word += tens_power [ len - 3 ] + " ▁ " ; ctr ++ ; } len -- ; Array . Copy ( num , 1 , num , 0 , num . Length - 1 ) ; } else { if ( ctr != 0 ) { s = " ▁ and ▁ " ; word = word . Substring ( 0 , word . Length - 1 ) ; } if ( num [ i + 1 ] == '0' ) if ( num [ i ] == '0' ) word = word + " th " ; else word += s + tens_multiple [ num [ i ] - '0' ] ; else if ( num [ i ] == '1' ) word += s + two_digits [ num [ i + 1 ] - '0' + 1 ] ; else { if ( num [ i ] != '0' ) word += s + tens_multiple [ num [ i ] - '0' ] . Substring ( 0 , tens_multiple [ num [ i ] - '0' ] . Length - 4 ) + " y ▁ " ; else word += s ; word += single_digits [ num [ i + 1 ] - '0' ] ; } i += 2 ; } if ( i == len ) { if ( word [ 0 ] == ' ▁ ' ) word = word . Substring ( 1 , word . Length - 1 ) ; } } return word ; } static void Aronsons_sequence ( int n ) { String str = " T ▁ is ▁ the ▁ " ; int ind = 0 ; for ( int i = 0 ; i < str . Length ; i ++ ) { if ( char . IsLetterOrDigit ( str [ i ] ) ) { ind += 1 ; } if ( str [ i ] == ' t ' str [ i ] == ' T ' ) { n -= 1 ; str += convert_to_words ( String . Join ( " " , ind ) . ToCharArray ( ) ) + " , ▁ " ; Console . Write ( ind + " , ▁ " ) ; } if ( n == 0 ) break ; } } public static void Main ( String [ ] args ) { int n = 6 ; Aronsons_sequence ( n ) ; } }

Index/key variables: i
Accumulator variables: ctr, i, ind, len, n, str, word
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void niceIndices ( int [ ] A , int n ) { int sum = 0 ; Dictionary < int , int > mp = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( mp . ContainsKey ( A [ i ] ) ) { var val = mp [ A [ i ] ] ; mp . Remove ( A [ i ] ) ; mp . Add ( A [ i ] , val + 1 ) ; sum += A [ i ] ; } else { mp . Add ( A [ i ] , 0 ) ; sum += A [ i ] ; } } for ( int i = 0 ; i < n ; ++ i ) { int k = sum - A [ i ] ; if ( k % 2 == 0 ) { k = k >> 1 ; if ( mp . ContainsKey ( k ) ) { if ( ( A [ i ] == k && mp [ k ] > 1 ) || ( A [ i ] != k ) ) Console . Write ( ( i + 1 ) + " ▁ " ) ; } } } } public static void Main ( String [ ] args ) { int [ ] A = { 8 , 3 , 5 , 2 } ; int n = A . Length ; niceIndices ( A , n ) ; } }

Index/key variables: i, k
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
class solution { static int countPieces ( int N ) { return 2 * N ; } static void Main ( ) { int N = 100 ; System . Console . WriteLine ( countPieces ( N ) ) ; } }

Class/struct names: solution
C# program:
using System ; class GFG { static long sumAP ( long n , long d ) { n /= d ; return ( n ) * ( 1 + n ) * d / 2 ; } static long sumMultiples ( long n ) { n -- ; return sumAP ( n , 3 ) + sumAP ( n , 7 ) - sumAP ( n , 21 ) ; } static public void Main ( String [ ] args ) { long n = 24 ; Console . WriteLine ( sumMultiples ( n ) ) ; } }

Accumulator variables: n
Class/struct names: GFG
C# program:
using System ; class GFG { static bool productSumDivisible ( int n , int size ) { int sum = 0 , product = 1 ; while ( n > 0 ) { if ( size % 2 == 0 ) { product *= n % 10 ; } else { sum += n % 10 ; } n = n / 10 ; size -- ; } if ( product % sum == 0 ) { return true ; } return false ; } public static void Main ( ) { int n = 1234 ; int len = 4 ; if ( productSumDivisible ( n , len ) ) Console . WriteLine ( " TRUE " ) ; else Console . WriteLine ( " FALSE " ) ; } }

Accumulator variables: product, size, sum
Class/struct names: GFG
C# program:
using System ; class GFG { static bool productSumDivisible ( int n ) { int sum = 0 ; int product = 1 ; string num = n . ToString ( ) ; for ( int i = 0 ; i < num . Length ; i ++ ) { if ( i % 2 != 0 ) { product = product * ( int ) Char . GetNumericValue ( num [ i ] ) ; } else { sum = sum + ( int ) Char . GetNumericValue ( num [ i ] ) ; } } if ( product % sum == 0 ) { return true ; } else { return false ; } } static public void Main ( ) { int n = 1234 ; if ( productSumDivisible ( n ) ) { Console . WriteLine ( " TRUE " ) ; } else { Console . WriteLine ( " FALSE " ) ; } } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static long gcd ( long a , long b ) { if ( a == 0 ) { return b ; } return gcd ( b % a , a ) ; } public static long powGCD ( long a , long n , long b ) { for ( int i = 0 ; i < n ; i ++ ) { a = a * a ; } return gcd ( a , b ) ; } public static void Main ( string [ ] args ) { long a = 10 , b = 5 , n = 2 ; Console . WriteLine ( powGCD ( a , n , b ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int lastCoordinate ( int n , int a , int b ) { return ( ( n + 1 ) / 2 ) * a - ( n / 2 ) * b ; } public static void Main ( string [ ] args ) { int n = 3 , a = 5 , b = 2 ; Console . WriteLine ( lastCoordinate ( n , a , b ) ) ; } }

Class/struct names: GFG
C# program:
public class GFG { static int findNum ( int N , int K ) { int rem = ( N + K ) % K ; if ( rem == 0 ) return N ; else return N + K - rem ; } static void Main ( ) { int N = 45 , K = 6 ; System . Console . WriteLine ( " Smallest ▁ number ▁ greater ▁ than ▁ or ▁ equal ▁ to ▁ " + N + " that is divisible by " + K + " ▁ is ▁ " + findNum ( N , K ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void countDigit ( int n ) { int temp = n , sum = 0 , product = 1 ; while ( temp != 0 ) { int d = temp % 10 ; temp /= 10 ; if ( d > 0 && n % d == 0 ) { sum += d ; product *= d ; } } Console . Write ( " Sum ▁ = ▁ " + sum ) ; Console . Write ( " Product = " } public static void Main ( ) { int n = 1012 ; countDigit ( n ) ; } }

Accumulator variables: product, sum, temp
Class/struct names: GFG
C# program:
using System ; class GFG { static int findNum ( int N , int K ) { int rem = N % K ; if ( rem == 0 ) return N ; else return N - rem ; } public static void Main ( ) { int N = 45 , K = 6 ; Console . Write ( " Largest ▁ number ▁ smaller ▁ " + " than ▁ or ▁ equal ▁ to ▁ " + N + " that is divisible by " + K + " ▁ is ▁ " + findNum ( N , K ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisiblePalindrome ( int n ) { int [ ] hash = new int [ 10 ] ; int digitSum = 0 ; while ( n != 0 ) { digitSum += n % 10 ; hash [ n % 10 ] ++ ; n /= 10 ; } if ( digitSum % 3 != 0 ) return false ; int oddCount = 0 ; for ( int i = 0 ; i < 10 ; i ++ ) { if ( hash [ i ] % 2 != 0 ) oddCount ++ ; } if ( oddCount > 1 ) return false ; else return true ; } static public void Main ( ) { int n = 34734 ; Console . WriteLine ( isDivisiblePalindrome ( n ) ) ; } }

Index/key variables: i
Accumulator variables: digitSum, i, n, oddCount
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int lcm ( int a , int b ) { return ( a * b ) / ( __gcd ( a , b ) ) ; } static int __gcd ( int a , int b ) { return b == 0 ? a : __gcd ( b , a % b ) ; } static int dfs ( int src , List < int > [ ] adj , bool [ ] visited ) { visited [ src ] = true ; int count = 1 ; for ( int i = 0 ; i < adj [ src ] . Count ; i ++ ) if ( ! visited [ adj [ src ] [ i ] ] ) count += dfs ( adj [ src ] [ i ] , adj , visited ) ; return count ; } static int findMinTime ( int [ ] arr , int [ ] P , int n ) { List < int > [ ] adj = new List < int > [ n + 1 ] ; for ( int i = 0 ; i < n + 1 ; i ++ ) adj [ i ] = new List < int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { adj [ arr [ i ] ] . Add ( P [ i ] ) ; } bool [ ] visited = new bool [ n + 1 ] ; int ans = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! visited [ i ] ) { ans = lcm ( ans , dfs ( i , adj , visited ) ) ; } } return ans ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 2 , 3 } ; int [ ] P = { 3 , 2 , 1 } ; int n = arr . Length ; Console . Write ( findMinTime ( arr , P , n ) ) ; } }

Index/key variables: i, src
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool productDivisible ( int n , int k ) { int product = 1 , position = 1 ; while ( n > 0 ) { if ( position % 2 == 0 ) product *= n % 10 ; n = n / 10 ; position ++ ; } if ( product % k == 0 ) return true ; return false ; } public static void Main ( ) { int n = 321922 ; int k = 3 ; if ( productDivisible ( n , k ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Accumulator variables: position, product
Class/struct names: GFG
C# program:
using System ; class GFG { static int factorial ( int n ) { int fact = 1 ; for ( int i = 2 ; i <= n ; i ++ ) fact = fact * i ; return fact ; } static int npr ( int n , int r ) { int pnr = factorial ( n ) / factorial ( n - r ) ; return pnr ; } static int countPermutations ( int n , int r , int k ) { return factorial ( k ) * ( r - k + 1 ) * npr ( n - k , r - k ) ; } static void Main ( ) { int n = 8 ; int r = 5 ; int k = 2 ; Console . WriteLine ( countPermutations ( n , r , k ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int GIF ( double n ) { return ( int ) Math . Floor ( n ) ; } static void Main ( ) { double n = 2.3 ; Console . WriteLine ( GIF ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int factorial ( int n ) { int fact = 1 ; for ( int i = 2 ; i <= n ; i ++ ) fact = fact * i ; return fact ; } static int ncr ( int n , int r ) { return factorial ( n ) / ( factorial ( r ) * factorial ( n - r ) ) ; } public static void Main ( ) { int m = 3 , n = 4 , k = 5 ; int totalTriangles = ncr ( m + n + k , 3 ) - ncr ( m , 3 ) - ncr ( n , 3 ) - ncr ( k , 3 ) ; Console . WriteLine ( totalTriangles ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool SumDivisible ( int n , int k ) { int sum = 0 , position = 1 ; while ( n > 0 ) { if ( position % 2 == 1 ) sum += n % 10 ; n = n / 10 ; position ++ ; } if ( sum % k == 0 ) return true ; return false ; } static public void Main ( ) { int n = 592452 ; int k = 3 ; if ( SumDivisible ( n , k ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Accumulator variables: position, sum
Class/struct names: GFG
C# program:
using System ; class GFG { static bool sumDivisible ( int n , int k ) { int sum = 0 ; string num = n . ToString ( ) ; int i ; for ( i = 0 ; i < num . Length ; i ++ ) { if ( i % 2 != 0 ) { sum = sum + ( num [ i ] - '0' ) ; } } if ( sum % k == 0 ) { return true ; } else { return false ; } } static public void Main ( ) { int n = 592452 ; int k = 3 ; if ( sumDivisible ( n , k ) ) { Console . Write ( " YES " ) ; } else { Console . Write ( " NO " ) ; } } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
class GFG { static string isTriangleExists ( int a , int b , int c ) { if ( a != 0 && b != 0 && c != 0 && ( a + b + c ) == 180 ) if ( ( a + b ) >= c || ( b + c ) >= a || ( a + c ) >= b ) return " YES " ; else return " NO " ; else return " NO " ; } static void Main ( ) { int a = 50 , b = 60 , c = 70 ; System . Console . WriteLine ( isTriangleExists ( a , b , c ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GfG { public int findX ( int n , int k ) { int r = n , v , u ; int m = ( int ) Math . Sqrt ( k ) + 1 ; for ( int i = 2 ; i <= m && k > 1 ; i ++ ) { if ( i == m ) { i = k ; } for ( u = v = 0 ; k % i == 0 ; v ++ ) { k /= i ; } if ( v > 0 ) { int t = n ; while ( t > 0 ) { t /= i ; u += t ; } r = Math . Min ( r , u / v ) ; } } return r ; } } class geek { public static void Main ( ) { GfG g = new GfG ( ) ; int n = 5 ; int k = 2 ; Console . WriteLine ( g . findX ( n , k ) ) ; } }

Accumulator variables: i, k, t, u, v
Iterator variables: i, u
Class/struct names: GfG, geek