結果

問題 No.197 手品
ユーザー jjjj
提出日時 2016-09-11 17:53:57
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 620 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 26,420 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-09 21:04:30
合計ジャッジ時間 1,722 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

program main
  implicit none
  character*3::b,f
  integer*8::N,bx,fx,i,bp,fp
  data bx,fx/2*0/
  read *,b,N,f

  do i=1,3
     if(b(i:i).eq.'x') bx = bx + 1
     if(f(i:i).eq.'x') fx = fx + 1
  end do

  if(bx.ne.fx) then
     print '(a)', "SUCCESS"
     return
  else if(bx.eq.3.or.bx.eq.0) then
     print '(a)', "FAILURE"
     return
  end if

  if(bx.eq.1) then
     bp = SCAN(b,'x')
     fp = SCAN(f,'x')
  else
     bp = SCAN(b,'o')
     fp = SCAN(f,'o')
  end if

  if(MOD(fp+bp,2).eq.MOD(N,2)) then
     print '(a)', "FAILURE"
     return
  else
     print '(a)', "SUCCESS"
     return
  end if
end program main
0