結果
問題 | No.445 得点 |
ユーザー |
![]() |
提出日時 | 2016-12-31 22:09:55 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 614 bytes |
コンパイル時間 | 3,348 ms |
コンパイル使用メモリ | 75,324 KB |
実行使用メモリ | 54,320 KB |
最終ジャッジ日時 | 2024-06-29 22:11:57 |
合計ジャッジ時間 | 6,034 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
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;}}