結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
takatowin
|
| 提出日時 | 2017-01-06 23:55:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 303 bytes |
| コンパイル時間 | 306 ms |
| コンパイル使用メモリ | 30,592 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-17 15:10:43 |
| 合計ジャッジ時間 | 1,001 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d %d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
int a,b,i;
char x[11],y[2]="3";
scanf("%d %d",&a,&b);
for(i=a;i<=b;i++){
sprintf(x,"%d",i);
if(i%3==0)
printf("%d\n",i);
else if(strstr(x,y)!=NULL)
printf("%d\n",i);
}
return 0;
}
takatowin