結果
| 問題 | No.3487 Restricted Shiritori |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-03 10:10:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 108 ms / 2,000 ms |
| コード長 | 203 bytes |
| 記録 | |
| コンパイル時間 | 421 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-03 10:10:52 |
| 合計ジャッジ時間 | 4,761 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
def Nmoji(N, s, e):
if N == 1:
if s == e:
print(s)
else:
print(-1)
else:
print(s+"a"*(N-2)+e)
s, e, N = input().split()
N = int(N)
Nmoji(N, s, e)