結果

問題 No.207 世界のなんとか
ユーザー 井戸ヨシアキ井戸ヨシアキ
提出日時 2020-09-17 19:29:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
OLE  
実行時間 -
コード長 772 bytes
コンパイル時間 1,097 ms
コンパイル使用メモリ 30,748 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-04 07:29:18
合計ジャッジ時間 48,992 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 OLE -
testcase_01 OLE -
testcase_02 OLE -
testcase_03 OLE -
testcase_04 OLE -
testcase_05 OLE -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 OLE -
testcase_15 OLE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main(void){
    int x,i,a;
	char s[]={" 3 6 9 12 13 15 18 21 23 24 27 30 31 32 33 34 35 36 37 38 39 42 43 45 48 51 53 54 57 60 63 66 69 72 73 75 78 81 83 84 87 90 93 96 99 102 103 105 108 111 113 114 117 120 123 126 129 130 131 132 133 133 134 135 136 137 138 139 141 143 144 147 150 153 156 159 162 163 165 168 171 173 174 177 180 183 186 189 192 193 195 198 201 203 204 207 210 213 216 219 222 223 225 228 230 231 232 233 233 234 235 236 237 238 239 240 243 246 249 252 253 255"};
    scanf("%d",&x);
    for(i=1;i<=x;i++){
        a=i;
        if(i%3==0)
            printf(" %d",i);
	else{
		while(a!=0){
			if(a%10==3)
				printf(" %d",i);
			a=a/10;
		}
	}
    }
    putchar('\n');
    printf("%s",s);
    return(0);
}


0