結果
問題 | No.774 tatyamと素数大富豪 |
ユーザー | mai |
提出日時 | 2018-12-22 00:04:06 |
言語 | Ruby (3.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 158 bytes |
コンパイル時間 | 292 ms |
コンパイル使用メモリ | 11,940 KB |
実行使用メモリ | 23,952 KB |
最終ジャッジ日時 | 2023-10-26 01:39:25 |
合計ジャッジ時間 | 12,662 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,711 ms
23,952 KB |
testcase_01 | AC | 100 ms
16,340 KB |
testcase_02 | TLE | - |
testcase_03 | AC | 109 ms
16,660 KB |
testcase_04 | AC | 100 ms
16,344 KB |
testcase_05 | AC | 103 ms
16,344 KB |
testcase_06 | AC | 99 ms
16,344 KB |
testcase_07 | AC | 100 ms
16,344 KB |
testcase_08 | AC | 99 ms
16,344 KB |
testcase_09 | AC | 1,419 ms
17,824 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
require 'prime' n = gets.to_i a = gets.chomp.split best = -1 a.permutation do |perm| i = (perm*"").to_i best = [best, i].max if i.prime? end p best