結果
問題 | No.136 Yet Another GCD Problem |
ユーザー |
|
提出日時 | 2015-01-26 11:24:39 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 86 ms / 5,000 ms |
コード長 | 104 bytes |
コンパイル時間 | 414 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-23 03:13:54 |
合計ジャッジ時間 | 4,380 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - k Syntax OK
ソースコード
n, k = gets.split.map(&:to_i) 2.upto(n) do |i| next if n % i != 0 puts n / i exit end puts 1