結果
| 問題 | No.46 はじめのn歩 |
| コンテスト | |
| ユーザー |
cnyanko1
|
| 提出日時 | 2017-11-23 16:20:36 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 35,584 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-25 01:18:51 |
| 合計ジャッジ時間 | 1,094 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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:714:30: note: expected 'const char *' but argument is of type 'int *'
714 | extern int puts (const char *__s);
| ~~~~~~~~~~~~^~~
ソースコード
#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