INFOSYS ANSWERS WEBSITE
INFOSYS 23RD ALL ANSWERS POSTED HERE
/>
/>
/>
INFOSYS ANSWERS POSTING SOON
n=int(input())
m=int(input())
s=input()
t=input()
def subString(s,n):
c=0
for i in range(n):
for len in range(i+1,n+1):
a=s[i: len]
c+=1
return c-2
if s==t:
print(1)
else:
if t in s:
print(subString(s,n))
else:
print(0)
Join
@freejobs77
@freejobs77
@freejobs77
@freejobs77
/>Angry professor
/>
/>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
/>
/>
/>
/>
/>
int main(){
int t,count=0;
scanf("%d",&t);
for(int a0 = 0; a0 < t; a0++){
count=0;
int n;
int k;
scanf("%d %d",&n,&k);
int a[n];
for(int a_i = 0; a_i < n; a_i++){
scanf("%d",&a[a_i]);
}
for(int a_i = 0; a_i < n; a_i++){
if(a[a_i]<=0)
count++;
}
if(count<k)
printf("YES\n");
else
printf("NO\n");
//count=0;
}
return 0;
}
/>
C language
/>
Telegram-Telegram-
/>
Join
@freejobs77
@freejobs77
@freejobs77
@freejobs77
/>n = int(input())
a = list(map(int,input().split()))
c = 0
for i in range(n-1):
for j in range(i+1:n):
s1 = sum(list(map(int,bin(i)[2:].split())))
s2 = sum(list(map(int,bin(j)[2:].split())))
if s1 == s2:
c += 1
print(c)
Python
Bob and Numbers Code
Join
@freejobs77
@freejobs77
@freejobs77
@freejobs77
@freejobs77
/>n=int(input())
x=int(input())
y=int(input())
z=int(input())
a=[]
for i in range(n):
a.append(int(input()))
s=(x*1)+(y*2)+(z*3)
c=0
for i in a:
if i<=s:
c+=1
print(c)
/>
John has an array
/>
class Main {
public static void main(String[] args) {
int[] numbers = {2, -9, 0, 5, 12, -25, 22, 9, 8, 12};
int sum = 0;
Double average;
// access all elements using for each loop
// add each element in sum
for (int number: numbers) {
sum += number;
}
// get the total number of elements
int arrayLength = numbers.length;
// calculate the average
// convert the average from int to double
average = ((double)sum / (double)arrayLength);
System.out.println("Sum = " + sum);
System.out.println("Average = " + average);
}
}
Telegram
/>int res=X*1 + Y*2 + Z*3;
int count=0;
for(int i=0;i<A.size();i++){
if(A.get(i)<=res){
count++;
}
}
return count;
For John Code
/>
Join
@freejobs77
@freejobs77
@freejobs77
@freejobs77
@freejobs77
/>N= int ( input())
L= list( map(int,input.split()))
K=int (input())
If k in L:
print (L.index(k)+1)
else:
print(-1)
Join
@freejobs77
@freejobs77
@freejobs77
@freejobs77
/>
Post a Comment
0 Comments