結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2018-07-11 22:10:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 65,216 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 00:40:56 |
合計ジャッジ時間 | 1,096 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream>using namespace std;typedef long long LL;bool has3(LL n){while (n>0){if (n%10==3){return true;}n/=10;}return false;}int main(int argc, char* argv[]){LL A,B;cin>>A>>B;LL A1,B1;A1=(A*3)/3;B1=(B*3)/3;for (LL i=A;i<=B;i++){if (i%3==0 || has3(i)){cout<<i<<endl;}}return 0;}