結果

問題 No.198 キャンディー・ボックス2
ユーザー jjjj
提出日時 2016-09-19 05:24:11
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 26,100 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-10 22:48:44
合計ジャッジ時間 1,505 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 WA -
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 WA -
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 WA -
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer*8::B,N,upper,total,i
  integer*8::C(10)
  read *,B,N
  if(N.eq.1) then
     print '(a)',"0"
     return
  end if

  read *,C(1:N)
  upper = (SUM(C(1:N))+B)/N
  total = 0
  do i=1,N
     total = total + ABS(C(i) - upper)
  end do
  print '(i0)', total
end program main
0