結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-27 11:53:46 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 278 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 19:20:08 |
| 合計ジャッジ時間 | 747 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d",&a);
| ^~~~~~~~~~~~~~
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d",&b);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(int argc, char *argv[]){
int a,b;
printf("歩幅入力\n");
scanf("%d",&a);
printf("距離入力\n");
scanf("%d",&b);
if(b%a == 0){
printf("%dcmを%dcm幅で歩くと%d歩で歩ける",b,a, b / a);
} else if(b%a != 0){
printf("%dcmを%dcm幅で歩くと%d歩で歩ける",b,a, 1+b / a);
}
return 0;
}