結果
| 問題 | No.3487 Restricted Shiritori |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-01 21:26:04 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 1,360 ms |
| コンパイル使用メモリ | 209,624 KB |
| 実行使用メモリ | 215,896 KB |
| 最終ジャッジ日時 | 2026-04-01 21:27:05 |
| 合計ジャッジ時間 | 2,359 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
int main(void){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
ll i,j;
ll N;
char s,e;
cin >> s >> e >> N;
if(N==1){
cout << -1 << endl;
return 0;
}
string x;
x+=s;
REP(i,N-2) x+=s;
x+=e;
cout << x << endl;
return 0;
}