結果
問題 | No.701 ひとりしりとり |
ユーザー | ldsyb |
提出日時 | 2018-06-15 23:15:50 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 346 ms |
コンパイル使用メモリ | 11,408 KB |
実行使用メモリ | 15,372 KB |
最終ジャッジ日時 | 2023-09-13 05:13:03 |
合計ジャッジ時間 | 3,014 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 88 ms
15,164 KB |
testcase_01 | AC | 84 ms
15,176 KB |
testcase_02 | AC | 83 ms
15,344 KB |
testcase_03 | AC | 83 ms
15,044 KB |
testcase_04 | WA | - |
testcase_05 | AC | 85 ms
15,312 KB |
testcase_06 | AC | 84 ms
15,096 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | RE | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
コンパイルメッセージ
Syntax OK
ソースコード
n=gets.to_i if n==1 puts 'n' exit end a=(0...26).map{|i|('a'.ord+i).chr*20} c='' i=rand(26) s=a[i] while s[19]=='n' i=random(26) s=a[i] end c=s[19] puts s a[i].next! (n-2).times{ i=c.ord-'a'.ord c=a[i][19] while c=='n' a[i].next! c=a[i][19] end puts a[i] a[i].next! } i=c.ord-'a'.ord c=a[i][19] while c!='n' a[i].next! c=a[i][19] end puts a[i]