結果
問題 |
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 none integer(8) A,X,Y,L read(*,*) X read(*,*) Y read(*,*) L if (mod(X,L)==0) then if (mod(Y,L)==0) then A=abs(X/L)+abs(Y/L) else A=abs(X/L)+abs(Y/L)+1 end if else if (mod(Y,L)==0) then A=abs(X/L)+1+abs(Y/L) else A=abs(X/L)+abs(Y/L)+2 end if end if if (Y>=0) then if (X==0) then A=A+0 else A=A+1 end if else A=A+2 end if write(*,*) A end