結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mosmos_21
                         | 
                    
| 提出日時 | 2016-10-04 23:55:29 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 237 bytes | 
| コンパイル時間 | 162 ms | 
| コンパイル使用メモリ | 20,352 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-21 17:01:01 | 
| 合計ジャッジ時間 | 1,022 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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);
  c += y < 0 ? 2 : 0;
  x = ~~x; y = ~~y;
  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