結果
問題 |
No.300 平方数
|
ユーザー |
|
提出日時 | 2015-11-17 05:52:33 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 374 ms / 1,000 ms |
コード長 | 293 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,800 KB |
最終ジャッジ日時 | 2024-09-13 15:54:17 |
合計ジャッジ時間 | 9,465 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
コンパイルメッセージ
Main.rb:7: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument Syntax OK
ソースコード
#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU x = gets.to_i def f (x, k) x end loop { d, m = x.divmod 4; break if m != 0; x = d; }; 3.step(x ** 0.5, 2) do |k| kk = k * k break if x < kk loop { d, m = x.divmod kk; break if m != 0; x = d; }; end puts x