Submission #111011


Source Code Expand

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
 
public class Main {
 
	public Main() {
		// TODO 自動生成されたコンストラクター・スタブ
	}
 
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		String[] strs = null;
		
		strs = read(strs);
		
		solve(strs);
	}
	
	private static void solve(String[] strs) {
		// TODO 自動生成されたメソッド・スタブ
		String ans = "";
		
		String[] nums = strs[0].split(" ");
		int a = Integer.parseInt(nums[0]);
		int b = Integer.parseInt(nums[1]);
		
		if(a<b){
			ans = String.valueOf(b);
		}else{
			ans = String.valueOf(a);
		}
		
		
//		int num = strs.length;
//
//		String[] s = new String[num];
//		String[] e = new String[num];
//		
//		for(int index = 0; index<strs.length; index++){
//			String[] split = strs[index].split("-");
//			s[index] = split[0];
//			e[index] = split[1];
//		}
//		
//		roundStart(s);
//		roundEnd(e);
//		
//		sort(s,e);
//		
//		marge(s,e);
//		
//		for(int index = 0; index<s.length; index++){
//			if(s[index].equals("null")){
//				break;
//			}
//				ans += s[index] + "-" + e[index] + "\n";
//		}
 
		System.out.println(ans);
	}
	
	private static void roundStart(String[] s){
		for(int index = 0; index < s.length; index++){
			int time = Integer.parseInt(s[index]);
			int i = time % 10;
			time -= i % 5;
			s[index] = String.valueOf(time);
		}
	}
	
	private static void roundEnd(String[] e){
		for(int index = 0; index < e.length; index++){
			int time = Integer.parseInt(e[index]);
			int i = time % 10;
			if(i != 0 && i != 5){
				time += 5 - (i % 5);
				e[index] = String.valueOf(time);
			}
		}
	}
	
	private static void sort(String[] s, String[] e){
		for(int i=0;i<s.length-1;i++){
			for(int j=s.length-1;j>i;j--){
				int s1 = Integer.parseInt(s[j]);
				int s2 = Integer.parseInt(s[j-1]);
				if(s1<s2){
					String tmp;
					tmp = s[j];
					s[j] = s[j-1];
					s[j-1] = tmp;
					
					tmp = e[j];
					e[j] = e[j-1];
					e[j-1] = tmp;
				}
			}
		}
	}
	
	private static void marge(String[] s, String[] e){
		String NULL = "null";
		for(int index = 1; index < s.length; index++){
			if(s[index].equals(NULL)){
				break;
			}
			int i_s = Integer.parseInt(s[index]);
			int i_e = Integer.parseInt(e[index-1]);
					
			if(i_e >= i_s){
				if(Integer.parseInt(e[index-1])<Integer.parseInt(e[index])){
					e[index -1] = e[index];
				}
				for(int i = index; i<s.length - 1;i++){
					s[i] = s[i+1];
					e[i] = e[i+1];
				}
				s[s.length-1] = NULL;
				e[e.length-1] = NULL;
				index--;
			}
		}
	}
	
	private static String[] read(String[] strs){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] num = new String[1];
		try {
			num[0] = in.readLine();
//			int i_num = Integer.parseInt(num);
//			strs = new String[i_num];
//			for(int i = 0; i < i_num; i++){
//				strs[i] = in.readLine();
//			}
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
		//return strs;
		return num;
	}
 
}

Submission Info

Submission Time
Task A - 正直者
User keitaro9ml
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 3283 Byte
Status AC
Exec Time 472 ms
Memory 20712 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 27
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, kensho_diff01, kensho_diff02, kensho_diff03, kensho_diff04, kensho_diff05, kensho_min-max01, kensho_min-max02, kensho_min-max03, kensho_min-max04, kensho_min-max05, kensho_min-max06, kensho_min-max07, kensho_min-max08, kensho_min-max09, kensho_min-max10, kensho_rand01, kensho_rand02, kensho_rand03, kensho_rand04, kensho_rand05, kensho_rand06, kensho_rand07, kensho_rand08, kensho_rand09, kensho_rand10
Case Name Status Exec Time Memory
00_sample_01.txt AC 472 ms 20692 KB
00_sample_02.txt AC 415 ms 20652 KB
kensho_diff01 AC 400 ms 20704 KB
kensho_diff02 AC 422 ms 20580 KB
kensho_diff03 AC 437 ms 20700 KB
kensho_diff04 AC 444 ms 20700 KB
kensho_diff05 AC 427 ms 20580 KB
kensho_min-max01 AC 416 ms 20684 KB
kensho_min-max02 AC 425 ms 20712 KB
kensho_min-max03 AC 449 ms 20556 KB
kensho_min-max04 AC 435 ms 20576 KB
kensho_min-max05 AC 408 ms 20628 KB
kensho_min-max06 AC 382 ms 20712 KB
kensho_min-max07 AC 409 ms 20576 KB
kensho_min-max08 AC 406 ms 20576 KB
kensho_min-max09 AC 401 ms 20696 KB
kensho_min-max10 AC 411 ms 20700 KB
kensho_rand01 AC 420 ms 20568 KB
kensho_rand02 AC 406 ms 20704 KB
kensho_rand03 AC 418 ms 20700 KB
kensho_rand04 AC 432 ms 20684 KB
kensho_rand05 AC 408 ms 20696 KB
kensho_rand06 AC 411 ms 20700 KB
kensho_rand07 AC 411 ms 20656 KB
kensho_rand08 AC 404 ms 20696 KB
kensho_rand09 AC 413 ms 20704 KB
kensho_rand10 AC 407 ms 20700 KB