結果

問題 No.207 世界のなんとか
ユーザー arishiki
提出日時 2015-12-23 16:09:22
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 10:40:12
合計ジャッジ時間 1,242 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
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){
  int y=x;
  do{
    if(!(y%10-3)) return 1;
    y=y/10;
  } while(y);

  return 0;
}
0