My solution for Land Ho! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

My solution for Land Ho!

I think this is simpliest solution of this challenge. Stare with me yours if different :) import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner read = new Scanner(System.in); int boat = 20; int queue = read.nextInt(); int trip = 10; int ret = 20; int numberOfTrips = queue / boat; System.out.println(numberOfTrips * ret + trip); } }

1st Dec 2022, 8:30 AM
Patryk Kryszczuk
Patryk Kryszczuk - avatar
1 Answer
+ 3
Hi you can share your codes on sololearn playground: Go to Code section, click+, select the programming language, insert your code, save. Check "Public" to make your code visible to others.
1st Dec 2022, 12:18 PM
Lisa
Lisa - avatar