結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-28 14:31:25 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 288 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-11 22:56:44 |
| 合計ジャッジ時間 | 893 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 9 RE * 1 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d", &A, &B);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
int A, B;
scanf("%d%d", &A, &B);
for(A;A<=B;A++){
if(A%3 == 0){
printf("%d\n",A); /*3の倍数出力*/
}else{
int N=1; /*N=桁数*/
while(A>N){
if(((A/N)%10) == 3 )/*3を探す*/
printf("%d\n",A);
N=N*10;
}
}
}
return 0;
}