結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
cnyanko1
|
| 提出日時 | 2017-11-23 16:22:40 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 05:36:44 |
| 合計ジャッジ時間 | 576 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:16:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
16 | printf("%d",&d);
| ~^ ~~
| | |
| | int *
| int
| %ls
main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d %d",&a,&b);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
int a,b,c,d;
scanf("%d %d",&a,&b);
c=b%a;
if(c==0){
d=c;
}else{
d=c+1;
}
printf("%d",&d);
return 0;
}
cnyanko1