結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2020-02-25 06:58:24 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 28,416 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 08:19:52 |
合計ジャッジ時間 | 1,238 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <stdio.h>#include <stdbool.h>bool exists3(long number) {char str[32];int len = sprintf(str, "%ld", number);for(int i = 0; i <= len; i++) {if(str[i] == '3')return true;}return false;}int main(void) {long A, B;scanf("%ld %ld", &A, &B);for(; A <= B; A++) {if (A % 3 == 0 || exists3(A)) {printf("%ld\n", A);}}}