Lockdown Weekly Challenge 1
Lockdown Weekly Challenge 1
The LCM and HCF of two positive numbers is 200 and 20, respectively. If one
of the numbers is 100, the other number is
40
Find the least number which divided which when divided by 5, 6, 7, 8 and 9
leaves reminders 3, 4, 5, 6 and 7 respectively.
2518
When n is divided by 4, the remainder is 3. What is the remainder when 2n is
divided by 4?
2
There are four prime numbers written in ascending order of magnitude. The
product of first three is 385 and that of last three is 1001, Find the first
number.
5
Find the number of factors of 80 ?
10
Each question consists of four sentences on a topic. Some sentences are
grammatically incorrect or inappropriate. Identify the incorrect sentence or
sentences:
A. Africa has a reputation of ferocity.
B. Tribal wars, genocide and starvation regularly hit headlines.
C. But there is also another Africa, young, fresh and full of hope.
D. Rick Mathews has captured some of this magic in his new book.
A and B
(A) A man who always connives / (B) on the faults of his children / (C) is their
worst enemy / (D) No error.
B
(A) I am hearing a lot / (B) about the problem / (C) of AIDS these days / (D)
No error.
B
(A) The captain and his wife / (B) were invited for the cultural function / (C) at
my home / (D) No error.
B
(A) The watchman was kind enough / (B) to inform us about the conspiracy /
(C) but declined to name the person behind it / (D) No error.
B
A) Some animals are much more capable / (B) than humans for perceiving /
(C) certain kinds of stimuli which may precede earth quakes / (D) No error.
B
Total number of prime numbers upto 50 are
15
If the number 556XX is divisible by 12. Find the value of X2 ?
1000 or -1728
A "calendar stick" carved centuries ago by the Winnebago tribe may provide
the first evidence that the North American Indians have developed advanced
full-year calendars basing them on systematic astronomical observation.
that the North American Indians developed advanced full-year calendars
based
}
}
Neumann's Random Generator
#include <stdio.h>
#include <stdlib.h>
int main()
{
long int num,squarenum,newnum;
int array[500],found=0;
scanf("%ld",&num);
array[0]=num;
for(int i=1;i<500;i++){
squarenum=num*num;
newnum=(squarenum%1000000)/100;
//printf("\n%ld..%ld\n",squarenum,newnum);
array[i]=newnum;
num=newnum;
for(int k=0;k<i;k++)
if(newnum==array[k]){
found=1;
printf("%d",i);
break;
}
if(found==1)
break;
}
}
Fair Francis
import java.io.*;
import java.util.*;
class Fairfrancis {
public static void main(String [] args) {
int n,i,j=0,k,l,m=0;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
int a[] = new int[n];
for(i=0;i<n;i++)
{
a[i] = sc.nextInt();
j=j+a[i];
}
k=j/n;
l=j-(k*n);
for(i=0;i<n;i++)
{
if(a[i]<k){a[i]=0;}
else{a[i]=a[i]-k;}
m=m+a[i];
}
m=m-l;
System.out.println(l+" "+m);
}
}
int main()
{
int x,xnext,i=0;
scanf("%d",&x);
for(i=0;xnext!=1;i++){
if(x%2==0)
xnext = x/2;
else
xnext = 3*x+1;
//printf("%d ",xnext);
x=xnext;
}
printf("%d",i);
return 0;
}