結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2017-02-27 21:04:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 411 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 59,664 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-11 19:50:00 |
合計ジャッジ時間 | 1,340 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 7 WA * 3 RE * 3 |
ソースコード
#include <iostream> #include <math.h> using namespace std; bool check(string S){ int num = 0; num = stoi(S); num = (int)log10((double)num) + 1; if(S.size() > num){ return false; } return true; } int main(void){ int i; string A,B; cin >> A >> B; if(check(A) == 1 && check(B) == 1){ cout << "OK\n"; }else{ cout << "NG\n"; } return 0; }