結果

問題 No.544 Delete 7
ユーザー ueyukiueyuki
提出日時 2017-09-12 03:58:24
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 248 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 18,048 KB
最終ジャッジ日時 2024-04-25 06:02:26
合計ジャッジ時間 8,758 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
17,536 KB
testcase_01 AC 88 ms
12,160 KB
testcase_02 AC 88 ms
12,160 KB
testcase_03 AC 91 ms
12,160 KB
testcase_04 AC 92 ms
12,160 KB
testcase_05 AC 96 ms
12,160 KB
testcase_06 AC 90 ms
12,160 KB
testcase_07 AC 108 ms
12,288 KB
testcase_08 AC 89 ms
12,288 KB
testcase_09 AC 89 ms
12,288 KB
testcase_10 AC 146 ms
12,288 KB
testcase_11 AC 89 ms
12,288 KB
testcase_12 AC 93 ms
12,160 KB
testcase_13 AC 90 ms
12,160 KB
testcase_14 AC 90 ms
12,288 KB
testcase_15 AC 118 ms
12,288 KB
testcase_16 AC 89 ms
12,160 KB
testcase_17 AC 90 ms
12,160 KB
testcase_18 AC 91 ms
12,160 KB
testcase_19 AC 92 ms
12,288 KB
testcase_20 AC 142 ms
12,416 KB
testcase_21 AC 89 ms
12,160 KB
testcase_22 AC 102 ms
12,416 KB
testcase_23 AC 88 ms
12,160 KB
testcase_24 AC 88 ms
12,288 KB
testcase_25 AC 87 ms
12,160 KB
testcase_26 AC 141 ms
12,544 KB
testcase_27 AC 89 ms
12,160 KB
testcase_28 AC 99 ms
12,288 KB
testcase_29 AC 94 ms
12,160 KB
testcase_30 AC 142 ms
12,288 KB
testcase_31 AC 96 ms
12,160 KB
testcase_32 AC 95 ms
12,416 KB
testcase_33 AC 199 ms
12,544 KB
testcase_34 AC 139 ms
12,416 KB
testcase_35 AC 331 ms
12,672 KB
testcase_36 AC 102 ms
12,416 KB
testcase_37 AC 681 ms
12,288 KB
testcase_38 AC 95 ms
12,416 KB
testcase_39 TLE -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i

num7 = n.to_s.count('7')
start = 0

1.upto(num7) do |i|
  start += 10 ** (i-1)
end

start.upto(n / 2) do |i| 
  x = n - i
  if ( i.to_s.count('7') == 0 && x.to_s.count('7') == 0 )
    printf("%d %d\n", i, x)
    exit
  end
end
0