This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
double x = 0; | |
double y = 0; | |
double a = 0; | |
int b = 0; | |
while (true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
while (scn.hasNext()) { | |
String str = scn.nextLine(); | |
int len = str.length(); | |
a: | |
while (true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
int[] arr = new int[5]; | |
arr[0] = scn.nextInt(); | |
arr[1] = scn.nextInt(); | |
arr[2] = scn.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
int n = scn.nextInt(); | |
long x = 1; | |
for (int i = 2; i <= n; i++) { | |
x = x * i; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
String str = scn.nextLine(); | |
System.out.println(str.toUpperCase()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
int n = scn.nextInt(); | |
for (int i = 0; i < n; i++) { | |
double x1 = scn.nextDouble(); | |
double y1 = scn.nextDouble(); | |
double x2 = scn.nextDouble(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
while (true) { | |
int n = scn.nextInt(); | |
if (n == 0) break; | |
LinkedList<Integer> ls = new LinkedList<Integer>(); | |
int buf = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
int n = scn.nextInt(); | |
for (int i = 0; i < n; i++) { | |
double xa = scn.nextDouble(); | |
double ya = scn.nextDouble(); | |
double ra = scn.nextDouble(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scn = new Scanner(System.in); | |
while (scn.hasNext()) { | |
double v = scn.nextDouble(); | |
System.out.println((int)(v * v / 98 + 1) + 1); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: UTF-8 | |
import random | |
print '###Hit and Blow###' | |
ls = range(10) | |
random.shuffle(ls) | |
answer = ls[:4] | |
while 1: | |
try: | |
nums = raw_input('0-9の整数を4つ入力してください(空白区切り):') | |
numarr = [int(e) for e in nums.split(' ') if len(e) == 1] |