結果
問題 |
No.83 最大マッチング
|
ユーザー |
![]() |
提出日時 | 2020-08-10 03:30:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 70,960 KB |
最終ジャッジ日時 | 2025-01-12 19:32:15 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <algorithm> int main() { int n; std::cin >> n; std::string ans; while (n) { if (n == 3) { ans += '7'; n -= 3; } else { ans += '1'; n -= 2; } } std::reverse(ans.begin(), ans.end()); std::cout << ans << std::endl; return 0; }