SlideShare a Scribd company logo

C Q You want to convert the natural number x to y The f.pdf

J
jaipur2

[C#] Q. You want to convert the natural number x to y. The following operations are available: Given the natural numbers x, y, and n as parameters, complete the solution function to return the minimum number of operations required to convert x to y. If you can't make x into y at this point, please return -1. Restrictions Input/Output Example Input/Output Example Description Input/Output Example #1 Multiply x by 2 twice to get 40 and this is the minimum number of times. Input/Output Example #2 x plus n = 30 times to get 40 and this is the minimum number of times. Input/Output Example #3 Returns -1 because x cannot be converted to y. [Write only a solution] using System; public class Solution { public int solution(int x, int y, int n) { int answer = 0; return answer; } } Add n to x Multiply x by 2. Multiply x by 3..

1 of 1
Download to read offline
[C#] Q. You want to convert the natural number x to y.
The following operations are available:
Given the natural numbers x, y, and n as parameters,
complete the solution function to return the minimum number of operations required to convert x to
y.
If you can't make x into y at this point, please return -1.
Restrictions
Input/Output Example
Input/Output Example Description
Input/Output Example #1
Multiply x by 2 twice to get 40 and this is the minimum number of times.
Input/Output Example #2
x plus n = 30 times to get 40 and this is the minimum number of times.
Input/Output Example #3
Returns -1 because x cannot be converted to y.
[Write only a solution]
using System;
public class Solution {
public int solution(int x, int y, int n) {
int answer = 0;
return answer;
}
}
Add n to x
Multiply x by 2.
Multiply x by 3.

Recommended

Java Programe Q.1-4 2. Rational Numbers (15 points) In mathematic.pdf
Java Programe Q.1-4 2. Rational Numbers (15 points) In mathematic.pdfJava Programe Q.1-4 2. Rational Numbers (15 points) In mathematic.pdf
Java Programe Q.1-4 2. Rational Numbers (15 points) In mathematic.pdffantasiatheoutofthef
 
Integer Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingInteger Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingSalah A. Skaik - MBA-PMP®
 
Gentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowGentlest Introduction to Tensorflow
Gentlest Introduction to TensorflowKhor SoonHin
 
REPRESENTATION OF FUNCTIONS.pptx
REPRESENTATION OF FUNCTIONS.pptxREPRESENTATION OF FUNCTIONS.pptx
REPRESENTATION OF FUNCTIONS.pptxGiezerAgamata1
 
Lecture 5 6_7 - divide and conquer and method of solving recurrences
Lecture 5 6_7 - divide and conquer and method of solving recurrencesLecture 5 6_7 - divide and conquer and method of solving recurrences
Lecture 5 6_7 - divide and conquer and method of solving recurrencesjayavignesh86
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningKhang Pham
 

More Related Content

Similar to C Q You want to convert the natural number x to y The f.pdf

Lesson 3a_operations of Functions.pptx
Lesson 3a_operations of Functions.pptxLesson 3a_operations of Functions.pptx
Lesson 3a_operations of Functions.pptxAlfredoLabador
 
AMS_502_13, 14,15,16 (1).pptx
AMS_502_13, 14,15,16 (1).pptxAMS_502_13, 14,15,16 (1).pptx
AMS_502_13, 14,15,16 (1).pptxbhavypatel2228
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursionAbdullah Al-hazmy
 
01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptxKokilaK25
 
2. Rational Numbers (15 points) In mathematics, a rational number i.pdf
2. Rational Numbers (15 points) In mathematics, a rational number i.pdf2. Rational Numbers (15 points) In mathematics, a rational number i.pdf
2. Rational Numbers (15 points) In mathematics, a rational number i.pdfFablooksurat
 
BOOTH Algorithm for Multiplication
BOOTH Algorithm for MultiplicationBOOTH Algorithm for Multiplication
BOOTH Algorithm for MultiplicationSnehalataAgasti
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
1 chapter1 introduction
1 chapter1 introduction1 chapter1 introduction
1 chapter1 introductionSSE_AndyLi
 
Design recursive algorithms for the following problems Compute the .pdf
Design recursive algorithms for the following problems  Compute the .pdfDesign recursive algorithms for the following problems  Compute the .pdf
Design recursive algorithms for the following problems Compute the .pdffortmdu
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 
Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematicalAditi Saxena
 
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docx
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docxPLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docx
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docxJakeT2gGrayp
 

Similar to C Q You want to convert the natural number x to y The f.pdf (19)

algorithm Unit 2
algorithm Unit 2 algorithm Unit 2
algorithm Unit 2
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Lesson 3a_operations of Functions.pptx
Lesson 3a_operations of Functions.pptxLesson 3a_operations of Functions.pptx
Lesson 3a_operations of Functions.pptx
 
AMS_502_13, 14,15,16 (1).pptx
AMS_502_13, 14,15,16 (1).pptxAMS_502_13, 14,15,16 (1).pptx
AMS_502_13, 14,15,16 (1).pptx
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursion
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
 
01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptx
 
2. Rational Numbers (15 points) In mathematics, a rational number i.pdf
2. Rational Numbers (15 points) In mathematics, a rational number i.pdf2. Rational Numbers (15 points) In mathematics, a rational number i.pdf
2. Rational Numbers (15 points) In mathematics, a rational number i.pdf
 
Regression
RegressionRegression
Regression
 
BOOTH Algorithm for Multiplication
BOOTH Algorithm for MultiplicationBOOTH Algorithm for Multiplication
BOOTH Algorithm for Multiplication
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
RecursionWeek8.ppt
RecursionWeek8.pptRecursionWeek8.ppt
RecursionWeek8.ppt
 
1 chapter1 introduction
1 chapter1 introduction1 chapter1 introduction
1 chapter1 introduction
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
 
Design recursive algorithms for the following problems Compute the .pdf
Design recursive algorithms for the following problems  Compute the .pdfDesign recursive algorithms for the following problems  Compute the .pdf
Design recursive algorithms for the following problems Compute the .pdf
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 
Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematical
 
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docx
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docxPLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docx
PLEASE DO NOT COPY OTHER CHEGG ANSWERS- AND PLEASE USE MATLAB- Write a.docx
 

More from jaipur2

Business organizations are relying more and more on social m.pdf
Business organizations are relying more and more on social m.pdfBusiness organizations are relying more and more on social m.pdf
Business organizations are relying more and more on social m.pdfjaipur2
 
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdf
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdfBu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdf
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdfjaipur2
 
Budget Analysis A budget is an expression of managements e.pdf
Budget Analysis A budget is an expression of managements e.pdfBudget Analysis A budget is an expression of managements e.pdf
Budget Analysis A budget is an expression of managements e.pdfjaipur2
 
BUSINESS LAW QUESTION Question 2 Ashik owns a landed pr.pdf
BUSINESS LAW QUESTION Question 2     Ashik owns a landed pr.pdfBUSINESS LAW QUESTION Question 2     Ashik owns a landed pr.pdf
BUSINESS LAW QUESTION Question 2 Ashik owns a landed pr.pdfjaipur2
 
Bu altrma Boston konut veri setini ierir a Balamak iin.pdf
Bu altrma Boston konut veri setini ierir a Balamak iin.pdfBu altrma Boston konut veri setini ierir a Balamak iin.pdf
Bu altrma Boston konut veri setini ierir a Balamak iin.pdfjaipur2
 
Bu snf arkadamn yazd bir tartma gnderisidir Yant vermem.pdf
Bu snf arkadamn yazd bir tartma gnderisidir  Yant vermem.pdfBu snf arkadamn yazd bir tartma gnderisidir  Yant vermem.pdf
Bu snf arkadamn yazd bir tartma gnderisidir Yant vermem.pdfjaipur2
 
Bu senaryo bir geici zm en iyi ekilde aklar Etkili.pdf
Bu senaryo bir geici zm en iyi ekilde aklar   Etkili.pdfBu senaryo bir geici zm en iyi ekilde aklar   Etkili.pdf
Bu senaryo bir geici zm en iyi ekilde aklar Etkili.pdfjaipur2
 
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdf
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdfBu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdf
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdfjaipur2
 
C++ ONLY Write a program that will keep track of information.pdf
C++ ONLY Write a program that will keep track of information.pdfC++ ONLY Write a program that will keep track of information.pdf
C++ ONLY Write a program that will keep track of information.pdfjaipur2
 
C++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfC++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfjaipur2
 
C++ only plz Write a function that takes two arguments and .pdf
C++ only  plz Write a function that takes two arguments and .pdfC++ only  plz Write a function that takes two arguments and .pdf
C++ only plz Write a function that takes two arguments and .pdfjaipur2
 
c++ please Write a recursive function that takes a string pa.pdf
c++ please Write a recursive function that takes a string pa.pdfc++ please Write a recursive function that takes a string pa.pdf
c++ please Write a recursive function that takes a string pa.pdfjaipur2
 
C The following payoff for three mutually exclusive projec.pdf
C The following payoff for three mutually exclusive projec.pdfC The following payoff for three mutually exclusive projec.pdf
C The following payoff for three mutually exclusive projec.pdfjaipur2
 
C++ only 319 LAB Exact change Write a program with total c.pdf
C++ only 319 LAB Exact change Write a program with total c.pdfC++ only 319 LAB Exact change Write a program with total c.pdf
C++ only 319 LAB Exact change Write a program with total c.pdfjaipur2
 
C++ pleae Your welcome DoublyLinkedList thisgthea.pdf
C++ pleae  Your welcome DoublyLinkedList  thisgthea.pdfC++ pleae  Your welcome DoublyLinkedList  thisgthea.pdf
C++ pleae Your welcome DoublyLinkedList thisgthea.pdfjaipur2
 
C++ is a highlevel programming language that consists of v.pdf
C++ is a highlevel programming language that consists of v.pdfC++ is a highlevel programming language that consists of v.pdf
C++ is a highlevel programming language that consists of v.pdfjaipur2
 
C++ Define a function unbalanced brackets that takes in a st.pdf
C++ Define a function unbalanced brackets that takes in a st.pdfC++ Define a function unbalanced brackets that takes in a st.pdf
C++ Define a function unbalanced brackets that takes in a st.pdfjaipur2
 
C++ The following code fragment will no compile What is w.pdf
C++   The following code fragment will no compile What is w.pdfC++   The following code fragment will no compile What is w.pdf
C++ The following code fragment will no compile What is w.pdfjaipur2
 
c What saving rate is needed to yield the goldenrule capi.pdf
c What saving rate is needed to yield the goldenrule capi.pdfc What saving rate is needed to yield the goldenrule capi.pdf
c What saving rate is needed to yield the goldenrule capi.pdfjaipur2
 
c++ Write the implementations of two functions to carry o.pdf
c++    Write the implementations of two functions to carry o.pdfc++    Write the implementations of two functions to carry o.pdf
c++ Write the implementations of two functions to carry o.pdfjaipur2
 

More from jaipur2 (20)

Business organizations are relying more and more on social m.pdf
Business organizations are relying more and more on social m.pdfBusiness organizations are relying more and more on social m.pdf
Business organizations are relying more and more on social m.pdf
 
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdf
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdfBu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdf
Bu yaz kamyonu farkl yerel topluluk etkinliklerine gtryor.pdf
 
Budget Analysis A budget is an expression of managements e.pdf
Budget Analysis A budget is an expression of managements e.pdfBudget Analysis A budget is an expression of managements e.pdf
Budget Analysis A budget is an expression of managements e.pdf
 
BUSINESS LAW QUESTION Question 2 Ashik owns a landed pr.pdf
BUSINESS LAW QUESTION Question 2     Ashik owns a landed pr.pdfBUSINESS LAW QUESTION Question 2     Ashik owns a landed pr.pdf
BUSINESS LAW QUESTION Question 2 Ashik owns a landed pr.pdf
 
Bu altrma Boston konut veri setini ierir a Balamak iin.pdf
Bu altrma Boston konut veri setini ierir a Balamak iin.pdfBu altrma Boston konut veri setini ierir a Balamak iin.pdf
Bu altrma Boston konut veri setini ierir a Balamak iin.pdf
 
Bu snf arkadamn yazd bir tartma gnderisidir Yant vermem.pdf
Bu snf arkadamn yazd bir tartma gnderisidir  Yant vermem.pdfBu snf arkadamn yazd bir tartma gnderisidir  Yant vermem.pdf
Bu snf arkadamn yazd bir tartma gnderisidir Yant vermem.pdf
 
Bu senaryo bir geici zm en iyi ekilde aklar Etkili.pdf
Bu senaryo bir geici zm en iyi ekilde aklar   Etkili.pdfBu senaryo bir geici zm en iyi ekilde aklar   Etkili.pdf
Bu senaryo bir geici zm en iyi ekilde aklar Etkili.pdf
 
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdf
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdfBu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdf
Bu ifadelerin her birinin doru mu yoksa yanl m olduuna karar.pdf
 
C++ ONLY Write a program that will keep track of information.pdf
C++ ONLY Write a program that will keep track of information.pdfC++ ONLY Write a program that will keep track of information.pdf
C++ ONLY Write a program that will keep track of information.pdf
 
C++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdfC++ Please I am posting the fifth time and hoping to get th.pdf
C++ Please I am posting the fifth time and hoping to get th.pdf
 
C++ only plz Write a function that takes two arguments and .pdf
C++ only  plz Write a function that takes two arguments and .pdfC++ only  plz Write a function that takes two arguments and .pdf
C++ only plz Write a function that takes two arguments and .pdf
 
c++ please Write a recursive function that takes a string pa.pdf
c++ please Write a recursive function that takes a string pa.pdfc++ please Write a recursive function that takes a string pa.pdf
c++ please Write a recursive function that takes a string pa.pdf
 
C The following payoff for three mutually exclusive projec.pdf
C The following payoff for three mutually exclusive projec.pdfC The following payoff for three mutually exclusive projec.pdf
C The following payoff for three mutually exclusive projec.pdf
 
C++ only 319 LAB Exact change Write a program with total c.pdf
C++ only 319 LAB Exact change Write a program with total c.pdfC++ only 319 LAB Exact change Write a program with total c.pdf
C++ only 319 LAB Exact change Write a program with total c.pdf
 
C++ pleae Your welcome DoublyLinkedList thisgthea.pdf
C++ pleae  Your welcome DoublyLinkedList  thisgthea.pdfC++ pleae  Your welcome DoublyLinkedList  thisgthea.pdf
C++ pleae Your welcome DoublyLinkedList thisgthea.pdf
 
C++ is a highlevel programming language that consists of v.pdf
C++ is a highlevel programming language that consists of v.pdfC++ is a highlevel programming language that consists of v.pdf
C++ is a highlevel programming language that consists of v.pdf
 
C++ Define a function unbalanced brackets that takes in a st.pdf
C++ Define a function unbalanced brackets that takes in a st.pdfC++ Define a function unbalanced brackets that takes in a st.pdf
C++ Define a function unbalanced brackets that takes in a st.pdf
 
C++ The following code fragment will no compile What is w.pdf
C++   The following code fragment will no compile What is w.pdfC++   The following code fragment will no compile What is w.pdf
C++ The following code fragment will no compile What is w.pdf
 
c What saving rate is needed to yield the goldenrule capi.pdf
c What saving rate is needed to yield the goldenrule capi.pdfc What saving rate is needed to yield the goldenrule capi.pdf
c What saving rate is needed to yield the goldenrule capi.pdf
 
c++ Write the implementations of two functions to carry o.pdf
c++    Write the implementations of two functions to carry o.pdfc++    Write the implementations of two functions to carry o.pdf
c++ Write the implementations of two functions to carry o.pdf
 

Recently uploaded

Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Association for Project Management
 
2024-02-24_Session 1 - PMLE_UPDATED.pptx
2024-02-24_Session 1 - PMLE_UPDATED.pptx2024-02-24_Session 1 - PMLE_UPDATED.pptx
2024-02-24_Session 1 - PMLE_UPDATED.pptxgdgsurrey
 
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...SUMIT TIWARI
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfMohonDas
 
Organic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsOrganic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsDr.M.Geethavani
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...i3 Health
 
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Aggregage
 
Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemchetanpatil2572000
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...AKSHAYMAGAR17
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxdeputymitchell2
 
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaDecision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaPrince Armah, PhD
 
EVALUATION POWERPOINT - STRANGER THINGS.pptx
EVALUATION POWERPOINT - STRANGER THINGS.pptxEVALUATION POWERPOINT - STRANGER THINGS.pptx
EVALUATION POWERPOINT - STRANGER THINGS.pptxiammrhaywood
 
Healthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationHealthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationPooky Knightsmith
 
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfUnit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfSUMIT TIWARI
 
Odontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxOdontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxMennat Allah Alkaram
 
EDL 290F Week 2 - Good Company (2024).pdf
EDL 290F Week 2  - Good Company (2024).pdfEDL 290F Week 2  - Good Company (2024).pdf
EDL 290F Week 2 - Good Company (2024).pdfElizabeth Walsh
 
Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary  Education in LithuaniaAndreas Schleicher_ Strengthening Upper Secondary  Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary Education in LithuaniaEduSkills OECD
 
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...Katherine Villaluna
 

Recently uploaded (20)

Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...
 
2024-02-24_Session 1 - PMLE_UPDATED.pptx
2024-02-24_Session 1 - PMLE_UPDATED.pptx2024-02-24_Session 1 - PMLE_UPDATED.pptx
2024-02-24_Session 1 - PMLE_UPDATED.pptx
 
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
Bilingual notes of Pharmacognosy chapter 4Glycosides, Volatile oils,Tannins,R...
 
Advance Mobile Application Development class 04
Advance Mobile Application Development class 04Advance Mobile Application Development class 04
Advance Mobile Application Development class 04
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
 
Organic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional GroupsOrganic Synthesis and Estimation of Functional Groups
Organic Synthesis and Estimation of Functional Groups
 
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
Enhancing MRD Testing in Hematologic Malignancies: When Negativity is a Posit...
 
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
Can Brain Science Actually Help Make Your Training & Teaching "Stick"?
 
Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery system
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
 
CLUBE PERLINGUAS .
CLUBE PERLINGUAS                        .CLUBE PERLINGUAS                        .
CLUBE PERLINGUAS .
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in GhanaDecision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
Decision on Curriculum Change Path: Towards Standards-Based Curriculum in Ghana
 
EVALUATION POWERPOINT - STRANGER THINGS.pptx
EVALUATION POWERPOINT - STRANGER THINGS.pptxEVALUATION POWERPOINT - STRANGER THINGS.pptx
EVALUATION POWERPOINT - STRANGER THINGS.pptx
 
Healthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentationHealthy Habits for Happy School Staff - presentation
Healthy Habits for Happy School Staff - presentation
 
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfUnit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
 
Odontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxOdontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptx
 
EDL 290F Week 2 - Good Company (2024).pdf
EDL 290F Week 2  - Good Company (2024).pdfEDL 290F Week 2  - Good Company (2024).pdf
EDL 290F Week 2 - Good Company (2024).pdf
 
Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary  Education in LithuaniaAndreas Schleicher_ Strengthening Upper Secondary  Education in Lithuania
Andreas Schleicher_ Strengthening Upper Secondary Education in Lithuania
 
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...
Practical Research 1, Lesson 5: DESIGNING A RESEARCH PROJECT RELATED TO DAILY...
 

C Q You want to convert the natural number x to y The f.pdf

  • 1. [C#] Q. You want to convert the natural number x to y. The following operations are available: Given the natural numbers x, y, and n as parameters, complete the solution function to return the minimum number of operations required to convert x to y. If you can't make x into y at this point, please return -1. Restrictions Input/Output Example Input/Output Example Description Input/Output Example #1 Multiply x by 2 twice to get 40 and this is the minimum number of times. Input/Output Example #2 x plus n = 30 times to get 40 and this is the minimum number of times. Input/Output Example #3 Returns -1 because x cannot be converted to y. [Write only a solution] using System; public class Solution { public int solution(int x, int y, int n) { int answer = 0; return answer; } } Add n to x Multiply x by 2. Multiply x by 3.