結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2019-06-17 11:31:29 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 1,965 ms |
コンパイル使用メモリ | 32,000 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 06:12:16 |
合計ジャッジ時間 | 2,714 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
implicit none integer(8) i,n,m,j,a,b integer(8),allocatable :: x(:,:) integer(8),allocatable :: y(:) read(*,*) n allocate (x(1:n+1,1:3)) allocate (y(1:10)) x=0 y=0 a=0 b=0 do i=1,n read(*,*) (x(i,m),m=1,3) do j=1,3 y(x(i,j))=y(x(i,j))+1 if (y(x(i,j))==2) then a=a+1 y(x(i,j))=y(x(i,j))-2 end if end do end do do i=1,11 if (y(i) == 1) then b=b+1 end if end do b=b/4 write(*,*) a+b end