結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-01-19 21:09:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 404 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 22,912 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-09 10:42:34 |
| 合計ジャッジ時間 | 808 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%lld%lld",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
typedef long long Int;
bool three(Int x){
while(x>0){
if(x%10==3){
return true;
}
x/=10;
}
return false;
}
int main(void){
Int i,a,b;
scanf("%lld%lld",&a,&b);
for(i=a; i<=b; i++){
if(i%3==0){
printf("%lld\n",i);
}else if(three(i)){
printf("%lld\n",i);
}
}
return 0;
}