結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-04-28 22:35:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 54,568 KB |
実行使用メモリ | 16,952 KB |
最終ジャッジ日時 | 2024-09-13 18:08:27 |
合計ジャッジ時間 | 6,892 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 2 |
other | -- * 27 |
ソースコード
#include <iostream> using namespace std; char a[1000000000]{}; int main() { long ans = 0; for (int i = 0; i < 1000000000; i++) { cin >> a[i]; if (a[i] == '1' || '2' || '3' || '5' || '7') ans += 2; else if (a[i] == '0' || '4' || '6' || '9')ans += 3; else if (a[i] == '8')ans += 4; else break; } ans++; cout << ans << endl; return 0; }