結果

問題 No.46 はじめのn歩
ユーザー ngtkanangtkana
提出日時 2020-02-24 13:03:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 266 bytes
コンパイル時間 1,530 ms
コンパイル使用メモリ 162,044 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-20 05:57:54
合計ジャッジ時間 3,032 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using longlong=long long;

int main(){
    std::cin.tie(nullptr);std::cin.sync_with_stdio(false);
    int x,y,l;std::cin>>x>>y>>l;
    int z=y<0?2:x!=0?1:0;
    if(y<0)y=-y;
    if(x<0)x=-x;
    std::cout<<(x+l-1)/l+(y+l-1)/l+z<<std::endl;
}
0