結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
A63295
|
| 提出日時 | 2015-12-17 21:28:05 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 237 bytes |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-16 07:37:45 |
| 合計ジャッジ時間 | 849 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 17 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:25: warning: implicit declaration of function ‘strchr’ [-Wimplicit-function-declaration]
9 | if( a % 3 == 0 || strchr(str, '3') != NULL)
| ^~~~~~
main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
1 | #include <stdio.h>
+++ |+#include <string.h>
2 | int main(void){
main.c:9:25: warning: incompatible implicit declaration of built-in function ‘strchr’ [-Wbuiltin-declaration-mismatch]
9 | if( a % 3 == 0 || strchr(str, '3') != NULL)
| ^~~~~~
main.c:9:25: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d%d",&a,&b);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int a, b, c;
scanf("%d%d",&a,&b);
for( a; a <= b; a++){
char str[16];
sprintf(str, "%d", a);
if( a % 3 == 0 || strchr(str, '3') != NULL)
printf("%d", a);
}
return 0;
}
A63295