結果

問題 No.83 最大マッチング
ユーザー keishi7773keishi7773
提出日時 2019-08-29 14:56:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 491 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 76,776 KB
実行使用メモリ 814,536 KB
最終ジャッジ日時 2023-08-11 04:02:45
合計ジャッジ時間 9,599 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <queue>
typedef long long ll;
using namespace std;
#define rep(i, n) for (int i = 0; i <= (int)(n); i++)
#define mod 1000000007

int main(){
	int N;
	cin >> N;
	string a;
	string b;
	if(N % 2 == 0){
		while(N % 2 == 0){
			a += "1";
		}
	}
	else if(N % 3 == 0){
		while(N % 3 == 0){
			b += "7";
		}
	}
	int aa = stoi(a);
	int	bb = stoi(b);
	int ans = max({aa, bb});
	cout << ans << endl;
}
0