結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | mottodora |
提出日時 | 2016-10-15 12:25:24 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 12,771 ms |
コンパイル使用メモリ | 388,852 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-23 02:25:53 |
合計ジャッジ時間 | 13,652 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
fn getline() -> String{ let mut ret = String::new(); std::io::stdin().read_line(&mut ret).ok(); return ret; } fn count(l:i32, m:i32, n:i32) -> i32 { let m_2 = n / 25; let l_2 = (m + m_2) / 4; return n%25+(m+m_2)%4+(l+l_2)%10 } fn main() { let s = getline(); let l:i32 = s.trim().parse().unwrap(); let s = getline(); let m:i32 = s.trim().parse().unwrap(); let s = getline(); let n:i32 = s.trim().parse().unwrap(); println!("{}", count(l, m, n)); }