結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
mosmos_21
|
| 提出日時 | 2016-10-04 23:54:46 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 238 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-21 17:00:56 |
| 合計ジャッジ時間 | 849 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 19 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d%d%d", &x, &y, &l);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int x, y, l, k, c=0;
scanf("%d%d%d", &x, &y, &l);
x = ~~x; y = ~~y;
c += y < 0 ? 2 : 0;
for(k = 0; k < x;k+=l,c++);
for(k = 0; k < y;k+=l,c++);
if(x!=0) c++;
printf("%d\n", c);
return 0;
}
mosmos_21