結果

問題 No.185 和風
ユーザー jjjj
提出日時 2016-07-30 07:01:39
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 299 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 27,376 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-06 17:17:51
合計ジャッジ時間 762 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

  integer::N
  integer,pointer::XY(:,:)
  integer,pointer::X(:),Y(:),Z(:)
  read *,N
  allocate(XY(2,N))
  allocate(Z(N))
  read *, XY
  X => XY(1,1:N)
  Y => XY(2,1:N)
  Z = Y - X

  if (Z(1).gt.0 .and. ALL(Z.eq.Z(1))) then
     print '(i0)', Z(1)
  else
     print '(i0)', -1
  end if
end program
0