首页 > 仰望水面的歪
头像 佛系的青年
发表于 2025-03-10 20:34:05
将折射的光线以水面为对称 反转上去 刚好z的位置应该射到2*h-z 用int后面几个例子过不去 需要改成long #include <iostream> #include <vector> using namespace std; //欧几里得算法求最大公约数 long 展开全文
头像 番禺小韭菜
发表于 2025-03-02 12:37:02
#include <iostream> #include <vector> using namespace std; long gcd(long a, long b){ return b==0? a : gcd(b,a%b); } int main() { 展开全文
头像 攀云
发表于 2025-04-26 12:32:49
#include <iostream> #include <vector> #include <numeric> using namespace std; long gcd3(long a, long b, long c) { return gcd( 展开全文
头像 asdukw
发表于 2025-03-30 16:41:51
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <algorithm> #include <cmath 展开全文
头像 英俊的回笼觉觉主在加班
发表于 2025-04-11 00:17:02
数据类型使用 long,int 类型只能过 2/3 的用例,排查了好久,怎么看都感觉代码没问题,就是过不了后面的用例,把 x,y,z 的数据类型全改成 long 就好了 import java.util.Scanner; public class Main { public static 展开全文
头像 龍眠
发表于 2025-03-31 16:49:28
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); 展开全文
头像 永夏360
发表于 2025-05-14 23:07:51
#include <iostream> using namespace std; #include<cmath> int gcd(long int a, long int b) { if(b == 0) { return a; } re 展开全文
头像 无敌小葵大王
发表于 2025-04-09 20:57:31
#include<bits/stdc++.h> using namespace std; int main(){ int n,h;cin>>n>>h; long long x,y,z; for(int i=0;i<n;i++){ scanf(& 展开全文
头像 牛客94987038号
发表于 2025-04-02 11:29:03
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in = 展开全文
头像 不要为打翻的牛奶哭泣
发表于 2025-04-05 13:35:20
将折射的光线以水面为对称 反转上去 刚好z的位置应该射到2*h-z用int后面几个例子过不去 需要改成long #include <iostream> #include <vector> using namespace std; long gcd(long a, long 展开全文

等你来战

查看全部