結果
| 問題 | No.207 世界のなんとか |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-23 15:50:10 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 29,516 KB |
| 最終ジャッジ日時 | 2026-02-23 20:16:05 |
|
ジャッジサーバーID (参考情報) |
judge3 / 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);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#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;
}