結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー |
![]() |
提出日時 | 2017-06-02 23:35:38 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 265 ms / 2,000 ms |
コード長 | 496 bytes |
コンパイル時間 | 1,875 ms |
コンパイル使用メモリ | 32,244 KB |
実行使用メモリ | 11,068 KB |
最終ジャッジ日時 | 2024-09-22 03:30:07 |
合計ジャッジ時間 | 2,649 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
program main implicit none integer::N,i,M,j,k integer::total integer,allocatable::tuple(:,:) character*32::cformat='( (i0,1x,i0,1x,i0))' data total/0/ read *,N M = N/3 do i=1, M total = total + (N-i)/2-i+1 end do allocate(tuple(3,total)) total = 1 do i=1, M do j=i,(N-i)/2 tuple(1,total)=i tuple(2,total)=j tuple(3,total)=N-i-j total = total + 1 end do end do print '(i0,1x,i0,1x,i0)', tuple end program main