Skip to content

adit26data/GitHub-Task

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GitHub-Task

Question 1

Given a word and a positive integer key, use an encryption method to encrypt it according to the key and shift specified.

Example:
if the word is ''apple" and the value of key is 3 and shift is 2 then the new encrypted word is

Original : a b c d e f g h i j k l m n o p ...
key=3
Cipher : d e f g h i j k l m n ...

apple -> dssoh

Shift 1: hdsso
Shift 2: ohdss

Output: ohdss

Sample Input and output:

INPUT

apple
3
2

OUTPUT:

ohdss




Question 2

You need to calculate the result of the given equation and write the answer using matches. Tell how many matches are require to write the answer. Equation: ax+bx+c = answer

image

Input
• The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows. • The first and only line of each test case contains four space-separated integers a, b, c and x

Output
• For each case, print only one integer which required matches need to write the answer.


Sample:

Input:
2
1 1 1 3
10 1 1 2

Output:
3
10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published