結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
![]() |
提出日時 | 2018-01-07 22:55:48 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-23 11:13:34 |
合計ジャッジ時間 | 1,052 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 WA * 5 |
ソースコード
program main implicit none integer n,m integer,allocatable,dimension(:)::a read(*,*)n allocate(a(n)) read(*,*)a if(a(1)==2*(n-1).and.a(2)==2*(n-1))then write(*,*)n,0 else m=maxval(a)+2 write(*,*)2*n-m/2,m/2-n endif end program main