結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2017-12-23 12:09:02 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 32,000 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 16:27:40 |
合計ジャッジ時間 | 938 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
program main implicit none integer ::n,pow=0,a(1:3),num(1:10)=0 integer i,j read(*,*)n do i=1,n read(*,*)a(1:3) do j=1,3 num(a(j))=num(a(j))+1 enddo enddo do i=1,10 do while(num(i)>=2) pow=pow+1 num(i)=num(i)-2 enddo enddo if(sum(num)>=8)then pow=pow+2 elseif(sum(num)>=4)then pow=pow+1 endif write(*,*)pow end program