結果
問題 |
No.791 うし数列
|
ユーザー |
![]() |
提出日時 | 2019-02-23 21:53:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 509 ms |
コンパイル使用メモリ | 53,648 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 14:10:27 |
合計ジャッジ時間 | 1,275 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 7 WA * 8 |
ソースコード
#include <iostream> using namespace std; int main(void){ 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++; } else{ digit = -1; break; } } cout << digit; }