結果
問題 | No.1198 お菓子配り-1 |
ユーザー |
|
提出日時 | 2020-09-27 01:33:34 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 549 bytes |
コンパイル時間 | 1,295 ms |
コンパイル使用メモリ | 30,080 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 02:37:10 |
合計ジャッジ時間 | 790 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
!N = 2mn + m^2 = (2n + m)m!(N/m-m) = 2n!N = 4an + 4a^2 = 4a(n + a)!N/4 = a(n+a)program mainimplicit noneinteger(16) :: ninteger(16) :: iread *, nif (n < 3) thenprint '(A)', "-1"stopend ifif (n == 4) thenprint '(A)', "-1"stopend ifif (mod(n, 2) == 1) thenprint '(A)', "1"stopend ifif (mod(n, 4) == 0) thenprint '(A)', "1"stopend ifprint '(A)', "-1"end program main