結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2019-07-25 15:51:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 22 ms / 5,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 27,776 KB |
最終ジャッジ日時 | 2025-01-07 07:29:27 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%ld %ld",&a,&b); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ unsigned long a,b; char numAsStr[11]; scanf("%ld %ld",&a,&b); for (;a<=b;a++){ if (!(a%3) || [&]()->bool{ sprintf(numAsStr,"%ld",a); for(const char& chara:numAsStr){ switch (chara){ case '3': return true; break; case '\0': goto OUT; } } OUT: return false; }())printf("%ld\n",a); } }