結果

問題 No.69 文字を自由に並び替え
ユーザー jjjj
提出日時 2016-07-22 15:20:41
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 1,279 ms
コンパイル使用メモリ 26,108 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-20 23:25:54
合計ジャッジ時間 1,881 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

  character*10::A,B
  integer::char_num(27)
  integer::pos_a,pos_b
  data char_num/27*0/
  read *,A,B
  do i=1,len_trim(A)
     pos_a = ICHAR(A(i:i))-ICHAR('a') + 1
     pos_b = ICHAR(B(i:i))-ICHAR('a') + 1
     char_num(pos_a) = char_num(pos_a) + 1
     char_num(pos_b) = char_num(pos_b) - 1
  end do
  do i=1,27
     if (char_num(i).ne.0) then
        print '(a)',"NO"
        return
     end if
  end do
  print '(a)',"YES"
end program
0