結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
piyoko_212
|
| 提出日時 | 2015-12-28 22:00:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 281 bytes |
| コンパイル時間 | 302 ms |
| コンパイル使用メモリ | 33,868 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 10:40:20 |
| 合計ジャッジ時間 | 961 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<algorithm>
using namespace std;
char str[20];
int main(){
int a,b;
scanf("%d%d",&a,&b);
for(int i=a;i<=b;i++){
bool ok=false;
if(i%3==0)ok=true;
sprintf(str,"%d",i);
for(int j=0;str[j];j++)if(str[j]=='3')ok=true;
if(ok)printf("%d\n",i);
}
}
piyoko_212