結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2014-10-23 22:52:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 13:05:58 |
合計ジャッジ時間 | 1,346 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d", &anpo_a); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:16:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%d", &anpo_b); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:17:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d", &kyori); | ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { // 関数 int now_position_x = 0; int now_position_y = 0; int anpo_a = 0; int anpo_b = 0; int kyori = 0; int a = 0; int b = 0; scanf("%d", &anpo_a); scanf("%d", &anpo_b); scanf("%d", &kyori); while(anpo_a >= 1) { anpo_a = anpo_a - kyori; a++; } while(anpo_b >= 1) { anpo_b = anpo_b - kyori; a++; } printf("%d\n", a); return 0; }