結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー 0w10w1
提出日時 2016-11-19 15:41:00
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 1,426 ms
コンパイル使用メモリ 166,376 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-05 04:13:15
合計ジャッジ時間 2,064 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

bool ok( string a, string b ){
  for( int i = 0; i < a.size(); ++i )
    if( not ( '0' <= a[ i ] and a[ i ] <= '9' ) )
      return false;
  for( int i = 0; i < b.size(); ++i )
    if( not ( '0' <= b[ i ] and b[ i ] <= '9' ) )
      return false;
  return true;
}

signed main(){
  string A, B; cin >> A >> B;
  if( not ok( A, B ) )
    cout << "NG" << endl;
  else
    cout << "OK" << endl;
  return 0;
}
0