Submission #2552764


Source Code Expand

n=gets.to_i;$<.map{|s|v,w=s.split.map &:to_i;(v>w&&(v,w=w,v);w=(w+n-2)/n)while 1<n&&v!=w;p v}

Submission Info

Submission Time
Task B - Evergrowing Tree
User kotatsugame
Language Ruby (2.3.3)
Score 100
Code Size 93 Byte
Status AC
Exec Time 1054 ms
Memory 5816 KB

Compile Error

./Main.rb:1: warning: `&' interpreted as argument prefix

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 20
Set Name Test Cases
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20
Case Name Status Exec Time Memory
a01 AC 7 ms 1788 KB
a02 AC 7 ms 1788 KB
b03 AC 7 ms 1788 KB
b04 AC 657 ms 2940 KB
b05 AC 627 ms 3768 KB
b06 AC 1040 ms 3000 KB
b07 AC 1054 ms 3000 KB
b08 AC 634 ms 5816 KB
b09 AC 1031 ms 2940 KB
b10 AC 880 ms 2940 KB
b11 AC 818 ms 2940 KB
b12 AC 757 ms 2940 KB
b13 AC 752 ms 2940 KB
b14 AC 692 ms 2940 KB
b15 AC 681 ms 2940 KB
b16 AC 658 ms 2940 KB
b17 AC 656 ms 2940 KB
b18 AC 635 ms 3000 KB
b19 AC 666 ms 3000 KB
b20 AC 627 ms 2940 KB