結果
| 問題 | No.3487 Restricted Shiritori |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-02 09:32:44 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 102 ms / 2,000 ms |
| コード長 | 150 bytes |
| 記録 | |
| コンパイル時間 | 534 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 36,056 KB |
| 最終ジャッジ日時 | 2026-04-02 09:32:49 |
| 合計ジャッジ時間 | 4,281 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
s, e, N = input().split()
N = int(N)
if N == 1:
if s == e:
print(s)
else:
print(-1)
else:
print(s + ("a" * (N - 2) + e))