結果

問題 No.207 世界のなんとか
ユーザー arishiki
提出日時 2015-12-23 15:50:10
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 6,784 KB
最終ジャッジ日時 2024-09-18 21:44:30
合計ジャッジ時間 6,644 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 5 TLE * 1 -- * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%d%d", &A, &B);
      |   ^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int ret3 (int x);

int main(void){
  int A, B, i;

  scanf("%d%d", &A, &B);

  for(i=A;i<=B;i++)
    if(!(i%3) || ret3(i)) printf("%d\n", i);

  return 0;
}

int ret3 (int x){
  do{
    if(!(x%10-3)) return 1;
    x=x/10;
  } while(!x);

  return 0;
}
0