結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
cnyanko1
|
| 提出日時 | 2017-11-23 16:20:36 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 22,144 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-27 05:36:43 |
| 合計ジャッジ時間 | 924 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:16:10: warning: passing argument 1 of ‘puts’ from incompatible pointer type [-Wincompatible-pointer-types]
16 | puts(&d);
| ^~
| |
| int *
In file included from main.c:1:
/usr/include/stdio.h:661:30: note: expected ‘const char *’ but argument is of type ‘int *’
661 | extern int puts (const char *__s);
| ~~~~~~~~~~~~^~~
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;
}
puts(&d);
return 0;
}
cnyanko1