結果
| 問題 | No.3487 Restricted Shiritori |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-24 19:47:14 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 119 ms / 2,000 ms |
| コード長 | 219 bytes |
| 記録 | |
| コンパイル時間 | 1,152 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-24 19:47:24 |
| 合計ジャッジ時間 | 7,969 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
s,e,n = map (str,input().split(' '))
n_int = int(n)
aw = "awsedrft"
if n_int == 1:
if s == e:
print(s)
else:
print(-1)
elif n_int == 2:
print(s + e)
else:
print(s + "a"*(n_int - 2) + e)