Some input and output statements for personal use.
Python Input#
Input a line of values separated by spaces#
# py2
w = raw_input().split()
# py3
w = input().split()
Input an integer variable#
# py2
w = map(int,raw_input().split())
# py3
w = map(int,input().split())
How to implement multiple inputs on OJ in JAVA#
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
double a = sc.nextDouble();
// DO
}
}
}
Multiple inputs in C#
int a, b;
while(scanf("%d%d", &a, &b) != EOF)
{
}
How to implement multiple inputs on OJ in C++#
while(cin >> a >> b){
}