結果

問題 No.445 得点
ユーザー yokoshabelyokoshabel
提出日時 2016-12-31 22:09:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 3,590 ms
コンパイル使用メモリ 72,880 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-09-12 09:28:35
合計ジャッジ時間 7,171 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,908 KB
testcase_01 AC 119 ms
55,772 KB
testcase_02 AC 119 ms
55,840 KB
testcase_03 AC 120 ms
55,900 KB
testcase_04 AC 120 ms
55,460 KB
testcase_05 AC 118 ms
55,816 KB
testcase_06 AC 120 ms
55,660 KB
testcase_07 AC 120 ms
55,664 KB
testcase_08 AC 120 ms
55,804 KB
testcase_09 AC 120 ms
55,892 KB
testcase_10 AC 119 ms
55,460 KB
testcase_11 AC 121 ms
55,788 KB
testcase_12 AC 120 ms
55,872 KB
testcase_13 AC 120 ms
55,532 KB
testcase_14 AC 119 ms
55,684 KB
testcase_15 AC 121 ms
56,184 KB
testcase_16 AC 119 ms
55,660 KB
testcase_17 AC 120 ms
55,896 KB
testcase_18 AC 121 ms
53,736 KB
testcase_19 AC 121 ms
55,840 KB
testcase_20 AC 122 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.out;
import java.util.Scanner;

public class No445{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		String sA=sc.next();
		String sB=sc.next();
		int n=toI(sA,6);
		int k=toI(sB,1000);
		int f=calc(n,k);
		if(f==0){out.println("error");}
		else{out.println(f);}
		sc.close();
	}
	
	private static int toI(String a,int max){
		try{
			int i=Integer.parseInt(a);
			if(i<=max){return i;}else{return 0;}
		}catch(NumberFormatException e){return 0;}
	}
	
	private static int calc(int n,int k){
		int f=50*n+(int)Math.floor(500*n/(8+2*k));
		return f;
	}
}
0