結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2017-06-21 18:43:57 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 299 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 10:56:32 |
合計ジャッジ時間 | 1,086 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 23 |
ソースコード
#include <stdio.h> int main(void){ int x, y, l; scanf("%d%d%d", &x, &y, &l); int ans = 0; if(y >= 0){ if(x){ ans++; } } else{ ans += 2; } if(l == 1){ printf("%d\n", ans + x + y); } else{ ans += (x+1)/l + (y+1)/l; printf("%d\n", ans); } return 0; }