結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2018-11-10 16:57:29 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 1,618 ms |
コンパイル使用メモリ | 30,720 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 14:58:11 |
合計ジャッジ時間 | 2,431 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
implicit noneinteger(8) A,X,Y,Lread(*,*) Xread(*,*) Yread(*,*) Lif (mod(X,L)==0) thenif (mod(Y,L)==0) thenA=abs(X/L)+abs(Y/L)elseA=abs(X/L)+abs(Y/L)+1end ifelseif (mod(Y,L)==0) thenA=abs(X/L)+1+abs(Y/L)elseA=abs(X/L)+abs(Y/L)+2end ifend ifif (Y>=0) thenif (X==0) thenA=A+0elseA=A+1end ifelseA=A+2end ifwrite(*,*) Aend