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