結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー 一ノ瀬卯月
提出日時 2019-03-04 14:00:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 57,148 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 13:27:06
合計ジャッジ時間 1,160 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;
int main()
{
	string s[2];
	bool flag = false;
	cin >> s[0] >> s[1];
	for (int i = 0; i < 2; i++)
	{
		if (s[i].size()>=2 && s[i].at(0) == '0') flag = true;
		else
		{
			for (int j = 1; j < s[i].length(); j++)
			{
				if (!(s[i].at(j) >= 48 && s[i].at(j) <= 57))
				{
					flag = true;
				}
			}
		}
	}

	cout << (flag ? "NG" : "OK") << endl;
	return 0;
}
0