結果
問題 | No.373 かけ算と割った余り |
ユーザー |
![]() |
提出日時 | 2017-03-31 15:49:15 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 1,985 ms |
コンパイル使用メモリ | 74,084 KB |
実行使用メモリ | 54,304 KB |
最終ジャッジ日時 | 2024-07-07 04:42:47 |
合計ジャッジ時間 | 3,467 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 |
ソースコード
import java.util.Scanner; public class Main{ static Scanner s=new Scanner(System.in); public static void main(String __[]){ input(); solve(); } private static void input(){ } private static void solve(){ long a=s.nextLong()*s.nextLong(),c=s.nextLong(),d=s.nextLong(); a%=d; a*=c; a%=d; System.out.println(a); } }