結果
問題 | No.131 マンハッタン距離 |
ユーザー |
|
提出日時 | 2016-02-15 20:56:28 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 5,000 ms |
コード長 | 237 bytes |
コンパイル時間 | 55 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 07:09:53 |
合計ジャッジ時間 | 1,238 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#coding: utf-8 ##yuki_131 s=map(int,raw_input().split()) x=int(s[0]) y=int(s[1]) d=int(s[2]) if x<y: x,y=y,x if y>=d: print d+1 elif x>d and y<=d: print y+1 elif x<=d and y<d: res=x+y-d+1 if res<=0: print 0 else: print res