結果
| 問題 |
No.604 誕生日のお小遣い
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-15 19:41:50 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 364 bytes |
| コンパイル時間 | 5,622 ms |
| コンパイル使用メモリ | 73,992 KB |
| 実行使用メモリ | 54,320 KB |
| 最終ジャッジ日時 | 2024-12-26 20:17:45 |
| 合計ジャッジ時間 | 9,727 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 8 WA * 13 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
long a = sc.nextLong();
long b = sc.nextLong();
long c = sc.nextLong();
long n = a-1+b; //a年間でn円
if (n >= c) {System.out.println(1);}
else {
long x = c/n;
long y = c%n;
System.out.println(x*a+y);
}
}
}
Tsukasa_Type