結果
| 問題 | 
                            No.8081 HQ9+
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ぷら
                         | 
                    
| 提出日時 | 2021-04-01 20:12:58 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 612 bytes | 
| コンパイル時間 | 1,560 ms | 
| コンパイル使用メモリ | 168,512 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-18 01:38:41 | 
| 合計ジャッジ時間 | 2,164 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 WA * 6 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main() {
    int N;
    string S;
    cin >> N >> S;
    if(S == "Hello, world!") {
        cout << "H" << endl;
        return 0;
    }
    bool flag = true;
    for(int i = 0; i < N; i++) {
        if(S[i] != 'Q') {
            flag = false;
        }
    }
    if(flag) {
        for(int i = 0; i < N; i++) {
            cout << "Q";
        }
        cout << endl;
        return 0;
    }
    if(S.size() > 13) {
        if(S.substr(0,13) == "99 bottles of") {
            cout << "9" << endl;
            return 0;
        }
    }
    cout << -1 << endl;
}
            
            
            
        
            
ぷら