×

# How do I take CodeChef input?

 0 I just started on this site and am completely confused. How do you take the test case input? Could someone give a simple example? asked 13 Oct '18, 18:51 0●1 accept rate: 0%

 0 Write a loop in any language you prefer. Consider this problem Following code is in python: t = int(input()) while t: n, x = map(int, input().split()) l = list(map(int, input().split())) t -= 1  answered 13 Oct '18, 19:05 2★a_d_i 174●6 accept rate: 23% This doesn't help with the input. I use Javascript and am trying to figure out whether arguments are passed to a function or taken some other way. (13 Oct '18, 19:09) Found a related question: https://discuss.codechef.com/questions/46860/input-in-javascript. (13 Oct '18, 19:12)
 0 Found my answer in this question: https://discuss.codechef.com/questions/72647/life-the-universe-and-everything-nodejs-solution. I will test it and come back witth the result. answered 13 Oct '18, 20:25 0●1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×361
×169

question asked: 13 Oct '18, 18:51

question was seen: 121 times

last updated: 13 Oct '18, 20:25