結果
問題 |
No.791 うし数列
|
ユーザー |
![]() |
提出日時 | 2019-02-23 22:00:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 436 bytes |
コンパイル時間 | 626 ms |
コンパイル使用メモリ | 53,644 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 14:23:56 |
合計ジャッジ時間 | 1,385 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 WA * 7 |
ソースコード
#include <iostream> using namespace std; int main(int argc, char ** argv){ int N; cin >> N; int digit = 0; while(true){ if(N % 10 == 1){ if(N > 10){ digit = -1; } break; } else if(N % 10 == 3){ if(N < 10){ digit = -1; break; } digit++; N = N / 10; } else{ digit = -1; break; } } cout << digit; }