結果

問題 No.1139 Slime Race
ユーザー キョウチクキョウチク
提出日時 2022-05-16 18:16:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 503 ms / 2,000 ms
コード長 612 bytes
コンパイル時間 3,868 ms
コンパイル使用メモリ 72,296 KB
実行使用メモリ 77,632 KB
最終ジャッジ日時 2023-10-12 11:56:48
合計ジャッジ時間 13,496 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,296 KB
testcase_01 AC 118 ms
56,024 KB
testcase_02 AC 117 ms
56,044 KB
testcase_03 AC 122 ms
56,312 KB
testcase_04 AC 118 ms
55,840 KB
testcase_05 AC 119 ms
55,736 KB
testcase_06 AC 167 ms
55,724 KB
testcase_07 AC 118 ms
56,068 KB
testcase_08 AC 117 ms
55,788 KB
testcase_09 AC 120 ms
56,184 KB
testcase_10 AC 503 ms
74,996 KB
testcase_11 AC 446 ms
73,860 KB
testcase_12 AC 500 ms
73,848 KB
testcase_13 AC 118 ms
55,724 KB
testcase_14 AC 460 ms
77,068 KB
testcase_15 AC 474 ms
70,800 KB
testcase_16 AC 465 ms
77,632 KB
testcase_17 AC 463 ms
76,352 KB
testcase_18 AC 413 ms
67,056 KB
testcase_19 AC 402 ms
68,348 KB
testcase_20 AC 355 ms
66,980 KB
testcase_21 AC 425 ms
68,140 KB
testcase_22 AC 457 ms
76,872 KB
testcase_23 AC 467 ms
77,520 KB
testcase_24 AC 116 ms
56,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test10 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String[] line;
    line=sc.nextLine().split(" ");
    int n=Integer.parseInt(line[0]);
    int d=Integer.parseInt(line[1]);
    int[] x=new int[n],v=new int[n];
    line=sc.nextLine().split(" ");
    for(int i=0;i<n;i++) x[i]=Integer.parseInt(line[i]);
    line=sc.nextLine().split(" ");
    for(int i=0;i<n;i++) v[i]=Integer.parseInt(line[i]);
    long v_t=0;
    for(int i=0;i<n;i++) v_t+=v[i];
    long t=d/v_t;
    if(d%v_t>0) t++;
    System.out.println(t);
    sc.close();
  }
}
0