結果
問題 |
No.8044 April Sum of Odd
|
ユーザー |
![]() |
提出日時 | 2023-02-13 01:50:14 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 08:18:42 |
合計ジャッジ時間 | 825 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
program main use iso_fortran_env implicit none integer(int64)::N,M integer(int64)::i,cnt,tmp integer,allocatable,dimension(:)::A read*,N,M allocate(A(N)) read*,A cnt=0;tmp=0 do i=1,N select case (mod(A(i),2)) case(0) if(cnt>=M)print"(i0)",tmp cnt=0;tmp=0 case(1) cnt=cnt+1 tmp=tmp+A(i) end select end do if(cnt>=M)print"(i0)",tmp end program main