結果
| 問題 |
No.619 CardShuffle
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2017-12-12 07:49:37 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 271 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 157,072 KB |
| 最終ジャッジ日時 | 2024-12-22 21:15:56 |
| 合計ジャッジ時間 | 78,215 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 17 TLE * 18 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Main.rb:4: warning: assigned but unused variable - i Syntax OK
ソースコード
n = gets.to_i
c = gets.chomp.delete(' ')
q = gets.to_i
for i in 1 .. q do
t, *p = gets.split
x, y = p.map(&:to_i).map{|n| n - 1}
if t == "!" then
c[y], c[x] = c[x], c[y]
else
fxy = (eval c[x .. y]) % 1000000007
puts fxy
end
end
くれちー